For example, --disable-debug-info enables debug-info, this results in
confusion.
In AC_ARG_ENABLE, the last two parts are action-if-present and
action-if-not-present, but not are action-if-enabled and
action-if-disable.
We can utilize autoconf's default and simplify configure.ac.
Signed-off-by: demin.han <demin.han@starfivetech.com>
Binutils and GCC have an install target 'install-strip' which can strips
debug symbols at install. This can reduce installed size largely.
LLVM has similar install target 'install/strip'.
Thanks for shenki's previous work
Signed-off-by: demin.han <demin.han@starfivetech.com>
`--enable-default-pie` is used to control the default PIE enablement for Linux
GCC, which is disabled by default.
NOTE: baremetal toolchain isn't affected by this option.
This adds support for building uClibc-ng toolchain so that we can play with
NOMMU Linux. This is still experimental (ABI is still WiP) but it works for
e.g. building busybox, and since crosstool-ng and others don't have support
for it yet, let's add it here so that people can play with it. I've tested
this on QEMU and real hardware (only busybox), it generates ELF (not FLAT)
binaries, and in order for the FDPIC loader to work, the static-pie loader
(/lib/ld-uClibc.so.0) should also be included in rootfs with busybox compiled
as dynamic/pie binary.
No multilib for now, but we can add it in the future if you think it would
be useful.
Signed-off-by: Nick Kossifidis <mick@ics.forth.gr>
A significant amount of users of this project are using it for toolchain
development. These users need to ensure that their code is warning free
before submitting it upstream. Let's support this use case by adding a
configure flag '--enable-host-gcc', which does exactly that:
* build a host GCC before building other components
* setting PATH such that this new GCC is used to build the cross
toolchain
* enable -Werror for the GCC build
This patch was tested on a Fedora 39 machine (GCC 13),
with the following modification in a GCC source file:
#if __GNUC__ == 13
#error Host compiler in use!
#endif
This fails when building without the new flag and does not fail
when building with latest upstream/master (GCC 14 prerelease).
The '--enable-werror-always' was tested with a warning that showed
up recently in upstream GCC.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
NOTE: This is toolchain developer facing feature.
This allow user to add extra testing multi-lib arch, it's useful when
develop and/or testing new extensions.
Usage:
--with-extra-multilib-test="arch-abi[;arch-abi]"
e.g.
linux enable enabled multilib, so default will build with follwoing
configuration:
lib32/ilp32;@march=rv32imac@mabi=ilp32
lib32/ilp32d;@march=rv32imafdc@mabi=ilp32d
lib64/lp64;@march=rv64imac@mabi=lp64
lib64/lp64d;@march=rv64imafdc@mabi=lp64d
But you want to testing more on vector stuffs like rv32gcv and rv64gcv,
then you can configure with `--with-extra-multilib-test="rv32gcv-ilp32d;rv64gcv;lp64d"`
Then the testing will run rv32imac-ilp32 rv32imafdc-ilp32d
rv64imac-lp64 rv64imafdc-lp64d and rv32gcv-ilp32d;rv64gcv;lp64d!
NOTE: Extra multilib test settings still require existing
multilib has support those extra settings, e.g. you can't add
rv32imafc_zbb-ilp32f on above example since no compatible multilib has
provided.
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>
GDB still defaults to 10.1 from the (already archived)
riscv-binutils-gdb repo. Let's bump the version to 12.1
and use the upstream git repo instead.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
I'm trying to clean up some of my test scripts, and one issue is that
I've got two QEMU builds: one for user-mode emulation and one for
system-mode emulation. This adds an autoconf flag that allows me to
avoid the duplication.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This lets users select whether or not to build libsanitizer, which
currently does not support rv32 and thus can't be enabled by default.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
The upstream musl libc does not support 32bit RISC-V builds.
We therefore only allow building the 64bit version (i.e.,
riscv64-unknown-linux-musl-).
Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
Since musl is already incorporated into the build system (see for
example configure.ac, Makefile.in), this patch adds a submodule for
musl based on the current v1.2.2 release.
The GitHub Actions configurations have also been updated to include
the musl based toolchain.
Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
Both the glibc and newlib submodules are already pointing to the
upstream repositories where development happens.
Since they are therefore not referring to RISC-V specific forks,
this patch unifies the directory naming by only prepending the
"riscv-" prefix to submodules that point to repositories in the
riscv-collab Github organization.
Signed-off-by: Florian Hofhammer <florian.hofhammer@fhofhammer.de>
The recent addition of an override for the QEMU source directory left
the default pointing to the wrong submodule.
Fixes: b83ee52 ("Allow source-override for QEMU")
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This patch introduces a configure-time source-dir override for QEMU
similar to the existing overrides for the other toolchain sources.
Signed-off-by: Christoph Muellner <cmuellner@linux.com>