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>
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).
- newlib was default to XOPEN MODE before 2018/12/6[1], but newlib
decide to remove XOPEN mode SVID3 mode, and change the default IEEE
mode.
- The problem is IEEE won't set errno on several math function, so
build with POSIX mode would be better for newlib.
- For newlib nano, we might able to build with _IEEE_LIBM in future
to reduce code size, and improve performance.
[1] https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;a=commit;h=b14a879d85b171960df789ac8ba2332004f838e0
Musl is great for embedded projects since it doesn't have any
external runtime dependencies on static builds (glibc needs
libnss for gethostbyname etc), and produces much smaller binaries.
It's also needed for supporting Alpine Linux (the most common distro
used for containers).
This patch expects the latest riscv-musl repository to be cloned
inside the source dir (e.g. as a submodule like the rest). Currently
only riscv64 is supported (no multilib).
Binutils and GDB are kept in the same repository but follow seperate
relaese streams. We've been release GDB versions based on binutils
tags, but this is the wrong thing to do and has caused multiple
headaches related to our out-of-tree GDB port.
This patch splits the binutils and GDB submodules, but doesn't actually
change the versions.
expat is required by cross for OpenOCD support, but not provided for native
builds, so replace BINUTILS_GDB_TARGET_FLAGS with BINUTILS_GDB_NATIVE_FLAGS.