diff options
author | Christoph Müllner <christoph.muellner@vrull.eu> | 2022-09-28 00:14:41 +0200 |
---|---|---|
committer | Kito Cheng <kito.cheng@sifive.com> | 2023-05-17 14:01:44 +0800 |
commit | ea26fd6cb82aaa8e7fc95adc704442dc466dac9e (patch) | |
tree | a9edf205efb85f89dbb0509a5ccfa9e3212adf65 /configure.ac | |
parent | ee1bb922707b53b479552b4aa8fb009b35ce8d22 (diff) | |
download | riscv-gnu-toolchain-ea26fd6cb82aaa8e7fc95adc704442dc466dac9e.zip riscv-gnu-toolchain-ea26fd6cb82aaa8e7fc95adc704442dc466dac9e.tar.gz riscv-gnu-toolchain-ea26fd6cb82aaa8e7fc95adc704442dc466dac9e.tar.bz2 |
Add support to build LLVM/clang with C and C++ support
We currently have a stale "llvm" branch, that does not build.
However, there is clear demand in the RISC-V toolchain community
for a working LLVM on top of a recent GNU toolchain.
In order to build such a toolchain, quite some LLVM and clang know-how is
required to avoid path issues at LLVM build time or later when using clang.
The main purpose of this commit is to demonstrate a way to combine
the RISC-V GNU toolchain repo with LLVM, with the intent to save
others hours of frustration, debugging time or support time.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 16178c7..a0cd3b6 100644 --- a/configure.ac +++ b/configure.ac @@ -221,6 +221,17 @@ AS_IF([test "x$enable_gdb" != xno], [AC_SUBST(enable_gdb, --enable-gdb)], [AC_SUBST(enable_gdb, --disable-gdb)]) +AC_ARG_ENABLE(llvm, + [AS_HELP_STRING([--enable-llvm], + [Build LLVM (clang)])], + [enable_llvm=yes], + [] + ) + +AS_IF([test "x$enable_llvm" != xyes], + [AC_SUBST(enable_llvm, --disable-llvm)], + [AC_SUBST(enable_llvm, --enable-llvm)]) + AC_DEFUN([AX_ARG_WITH_SRC], [{m4_pushdef([opt_name], with_$1_src) AC_ARG_WITH($1-src, @@ -244,6 +255,7 @@ AX_ARG_WITH_SRC(gdb, gdb) AX_ARG_WITH_SRC(qemu, qemu) AX_ARG_WITH_SRC(spike, spike) AX_ARG_WITH_SRC(pk, pk) +AX_ARG_WITH_SRC(llvm, llvm) AC_ARG_WITH(linux-headers-src, [AC_HELP_STRING([--with-linux-headers-src], |