Using llvm-objdump I found warning if file was
compiled using riscv-gcc. Examples:
warning: failed to find source riscv-glibc/csu/elf-init.c
It concerned with compilation glibc with
debug info that is unnecessary operation. If user want to have debug info, than it's easy to pass -g.
This option wasn't touched more than 7 years...
This could help multi-lib testing, but the price is slightly increase
the testing time since it will need to extract ELF attribute from binary
before running qemu.
But I think the cost is acceptable compare to make build system more
complicate, and actually we already use this approach in our internal stuffs
for years.
There is no $(NEWLIB_TUPLE)-gcc in install directory
during cross-compilation process. For example,
to compile for Windows, we has to have riscv64-unknown-elf-gcc
in our PATH and we has to use it with print-multi-lib
to find multilib configuration, because install
folder contains only .exe files (can not be executed)
This bugfix is to check: whether compiler we already
have for host - in the install directory or in the PATH.
There is no way to pass extra flags to gcc though
riscv-gnu-toolchain Makefile.
This is neccesary for me, because I has to rewrite gmp,
isl, mpfr, mpc folders in source of gcc project. Moreover,
I don't want to rebuild them with gcc.
Also I think, the opportunity to pass extra flags will be
convenient for many development purposes.
We have this feature for all other packages.
It is particularly useful to avoid pointless internet downloads
for automatic builds.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
Makefile.in has support for running the regression test suite of
Binutils, GCC and others. Let's add support for running glibc tests.
To run the tests the following command can be used:
make check-glibc-linux
Tested with linux/rv64.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
This allows to specify the test cases to be run.
For example the following command can be used to restrict the testcases
that will be executed to zb*.c and sm*.c from the directory
`gcc/testsuite/gcc.target/riscv/` (which includes the file `riscv.exp`):
RUNTESTFLAGS="riscv.exp=zb*.c\ sm*.c" make report
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
We should not encourage people to call "sudo make".
Let's drop that recommendation in case of permission errors.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
dejagnu still defaults to 1.6 from the (already archived)
riscv-dejagnu repo. Let's bump the version to 1.6.3
and use the upstream git repo instead.
Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
* The riscv-pk repo can only be built by rv32i.
* Change configure to rv32i to make SIM=spike option happy for multilib.
Signed-off-by: Pan Li <pan2.li@intel.com>
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>
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>
We set CXX=riscv64-unknown-linux-gnu-g++ (or something like that) when
building glibc, but don't actually build a C++ compiler during stage 1.
Under normal conditions this shouldn't cause any issues: that's either a
working compiler (from PATH) or doesn't exist, in which case glibc's
build scripts do the right thing and turn off C++. Unfortunately I'm in
the pathological situation of having a slightly-incompatible g++ in
PATH, which glibc then attempts to use only to throw an error when
linking (glibc isn't testing that much of the C++ toolchain, see
<https://sourceware.org/bugzilla/show_bug.cgi?id=24183>).
This simply sets CXX to something that's unlikely to exist during the
glibc build, so the build scripts don't get confused. I tried setting
this to false, but everything was italic.
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
This helps identify the exact sources used for building the compiler.
| riscv64-unknown-linux-gnu-gcc -v
|
| Before: gcc version 11.1.0 (GCC)
| After : gcc version 11.1.0 (g480822473a4a)
Signed-off-by: Vineet Gupta <vineetg@rivosinc.com>
The variable MULTLIB_NAMES does not exist but is used when
generating the dependencies for the target build-libc for glibc.
Even when adding the missing 'I' (for MULTILIB_NAMES) there is
still no variable with this name.
So the whole dependency generation is useless, becauese it was not
needed so far. Looking into detail why it is so, we can find the
answer in the dependency list of the target 'stamps/build-gcc-linux-stage2'.
Let's fix this by setting the dependencies for build-libc right.
The dependencies for 'stamps/build-gcc-linux-stage2' stay as they are
not wrong.
Fixes: 3456b66f69 ("Add a "make report" phony target")
Signed-off-by: Christoph Muellner <cmuellner@linux.com>
Otherwise, this code breaks if riscv-gnu-toolchain is itself a
submodule of another project. In that case the git config for this
tree will be $(srcdir)/../.git/modules/riscv-gnu-toolchain/config.
Use = to compare strings with the test builtin command instead of ==,
which is non-standard and sometimes unsupported by stricter POSIX shells
(e.g., dash as /bin/sh).