Skip to content

Commit 883ca7c

Browse files
authored
Merge pull request #285 from cpc/riscv_build_fixes
Riscv build fixes
2 parents a1e9ee3 + 7e42dea commit 883ca7c

File tree

6 files changed

+9
-37
lines changed

6 files changed

+9
-37
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,6 @@ Make sure your installation directory is added to `PATH` correctly:
225225
export PATH=$HOME/local/bin:$PATH
226226
```
227227

228-
After this the RISC-V support can be enabled by adding `--enable-riscv`
229-
option to the configure command in the following general
230-
building and installation instructions.
231-
232228
Building and Installing OpenASIP
233229
===========================
234230

openasip/Makefile.am

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ SUBDIRS += bclib
66
SUBDIRS += newlib-1.17.0/tce-llvm
77
SUBDIRS += newlib-1.17.0/tcele-llvm
88
SUBDIRS += newlib-1.17.0/tcele64-llvm
9-
10-
if RISCV
119
SUBDIRS += newlib-1.17.0/riscv-llvm
12-
endif
1310

1411
AUTOMAKE_OPTIONS = foreign
1512

openasip/configure.ac

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -542,17 +542,6 @@ case $host_os in
542542
;;
543543
esac
544544
545-
AC_ARG_ENABLE(riscv,
546-
[AS_HELP_STRING([--enable-riscv],[enable the (experimental) RISC-V support])],
547-
[
548-
ENABLE_RISCV=true
549-
],
550-
[
551-
ENABLE_RISCV=false
552-
]
553-
)
554-
AM_CONDITIONAL(RISCV, test x$ENABLE_RISCV = xtrue)
555-
556545
# Hack for debian sid packages
557546
if test x"$LLVM_INCLUDEDIR" == x/usr/include/llvm; then
558547
LLVM_INCLUDEDIR=/usr/include
@@ -1590,9 +1579,6 @@ $srcdir/newlib-1.17.0/configure --prefix=$prefix --target=tcele64-llvm --disable
15901579
2>&1 | egrep -v "to force reconfigure";
15911580
])
15921581

1593-
if test x"$ENABLE_RISCV" = xtrue
1594-
then
1595-
15961582
AC_CONFIG_COMMANDS_POST ([
15971583
echo "=== Configuring newlib for riscv =====";
15981584
# make srcdir absolute
@@ -1613,8 +1599,6 @@ $srcdir/newlib-1.17.0/configure --prefix=$prefix --target=riscv --disable-multil
16131599
2>&1 | egrep -v "to force reconfigure";
16141600
])
16151601

1616-
fi
1617-
16181602
# Generate config.status and launch it. config.status then
16191603
# performs all configuration actions.
16201604
AC_OUTPUT
@@ -1677,13 +1661,6 @@ else
16771661
echo "Found LLVM version $LLVM_VERSION"
16781662
fi
16791663

1680-
if test x"$ENABLE_RISCV" = xtrue
1681-
then
1682-
echo "RISC-V support enabled."
1683-
else
1684-
echo "RISC-V support not enabled."
1685-
fi
1686-
16871664

16881665
# else
16891666
#

openasip/data/riscv/RISCVPluginMakefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@ LLVMTCE_INCLUDE_DIR := $(shell llvmtce-config --includedir)
77
CXXFLAGS += -I$(LLVMTCE_INCLUDE_DIR) -I .
88
TABLEGEN_INCLUDE = -I$(LLVMTCE_INCLUDE_DIR) -I .
99

10-
# Linking flags
11-
LDFLAGS := -shared
12-
1310
# Tablegen executable
1411
TABLEGEN := llvm-tblgen
1512

@@ -138,7 +135,7 @@ RISCVGenSubtargetInfo.inc: $(TD_FILE)
138135

139136
# Link object files into shared library
140137
$(LIBRARY): $(OBJS)
141-
$(CXX) $(LDFLAGS) -o $@ $(OBJS)
138+
$(CXX) -shared $(LDFLAGS) -o $@ $(OBJS)
142139
rm -f $(OBJS) $(TABLEGEN_TARGETS)
143140

144141
# Clean up
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
SUBDIRS=tceopgen llvm-tce riscv-tdgen
1+
SUBDIRS = tceopgen llvm-tce riscv-tdgen
22

33
bin_SCRIPTS = oacc oacc-riscv
4-
EXTRA_DIST = ${bin_SCRIPTS}
4+
EXTRA_DIST = ${bin_SCRIPTS}
5+
6+
all-local:
7+
+./oacc-riscv --generate-plugin --tce-build-mode
8+
9+
.PHONY: all-local

openasip/tools/scripts/install_riscv_tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function eexit {
2121
}
2222

2323
function install_gnu_toolchain {
24-
version=2023.07.07
24+
version=2025.05.30
2525
repository=https://github.com/riscv-collab/riscv-gnu-toolchain
2626
name=riscv-gnu-toolchain
2727
git clone $repository || eexit "git clone $name failed"

0 commit comments

Comments
 (0)