This is the mail archive of the 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: How to build/test glibc with new gcc

On 07/17/2015 12:50 PM, Szabolcs Nagy wrote:
> i'm wondering what's the official way to build glibc with new gcc.
> the documentation about building glibc assumes that the host
> compiler is used when doing a native build, but if gcc is installed
> at some prefix path, then the tests don't use the right libraries:
> they use and of the host (or fail
> when the host does not have these).
> Using LD_LIBRARY_PATH does not work as the tests override the
> library path, but i assume this can be solved by either adding
> -Wl,-rpath=/gcc/prefix/lib to the LDFLAGS of the tests or
> copying the compiler runtime into the build path:
> export PATH="/path/to/gcc-prefix/bin:$PATH"
> cp -a /path/to/gcc-prefix/lib*/*.so* .
> /path/to/glibc-src/configure --prefix=/usr
> make -j
> make check
> is there a cleaner way to do it?

Yes, don't use native builds. You must configure everything as
if you were in a cross-compilation environment, that way you get
sysroot isolation which you need.

The safest thing after that is to convince Joseph Myers that
--enable-poison-system-directories should go upstream? This
provides assurances that you don't touch the system headers.


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