This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: glibc-testsuite: running g++ tests in cross-compile setup


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]