This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: glibc-testsuite: running g++ tests in cross-compile setup
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Vineet Gupta <Vineet dot Gupta1 at synopsys dot com>
- Cc: "buildroot at busybox dot net" <buildroot at busybox dot net>, "libc-alpha @ sourceware . org" <libc-alpha at sourceware dot org>, "Alexey Brodkin" <Alexey dot Brodkin at synopsys dot com>
- Date: Tue, 16 Jan 2018 01:02:55 +0000
- Subject: Re: glibc-testsuite: running g++ tests in cross-compile setup
- Authentication-results: sourceware.org; auth=none
- References: <22b488c2-6f3f-ec35-48b4-401e07b7c1d5@synopsys.com>
On Mon, 15 Jan 2018, Vineet Gupta wrote:
> I'm not sure if this is a glibc or buildroot issue..
>
> gcc-initial : config.log has --enable-languages=c
> gcc-final : config.log has --enable-languages=c,c++
> glibc : config.log has --enable-languages=c
>
> I guess issue is #3, but does anyone know why ?
To run glibc C++ tests, glibc must have been configured with a
C++-supporting compiler. And to build libstdc++, GCC must have been
configured with a sysroot that includes glibc. The effect of this is that
to have a glibc build tree suitable for running the full testsuite, if you
don't have a pre-existing toolchain you need to build both GCC and glibc
twice (initial C-only GCC, glibc for sysroot, C++-supporting GCC, glibc
build tree for testing). (With build-many-glibcs.py - which only runs the
compilation parts of the testsuite - the "compilers" stage builds two GCCs
and one glibc, then the "glibcs" stage builds glibc again and runs tests -
it's possible to keep the installation from the "compilers" stage around
and keep using it to test newer versions of glibc.)
Note that for execution testing you should also copy libgcc_s.so.1 and
libstdc++.so.6 into the glibc build tree before running "make check",
unless the libraries for the compiler being used are in system directories
searched by the dynamic linker by default, as recently noted in the RISC-V
port discussion.
--
Joseph S. Myers
joseph@codesourcery.com