This is the mail archive of the libc-help@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]

multilib build


Hi,

I have a question w.r.t. building glibc for a multilib gcc:

Let's assume I compiled an x86_64 gcc with --with-multilib-list="m32,m64,mx32". In this case, I need to build glibc 3 times, passing one of the -m32, -m64 and -mx32 to my gcc on each of these glibc builds. The gcc option -print-multi-lib is quite helpful here: Each line of "gcc -print-multi-lib" shows the option(s) to use for building the related glibc, e.g.:

$ gcc -print-multi-lib
.;
32;@m32
x32;@mx32

If my toolchain build script must be more generic, say be able to also build an ARM multilib toolchain, I can parse that output to find out how many and how to build the glibcs expected by the corresponding compiler.

So far, everything is fine. But the glibc builds also requires the host triplet to be given, and for an x86_64 multilib build, that host triplet must be something like x86_64-linux-gnu when compiling the glibc with either the -m64 or the -mx32 option, but must be something like i386-linux-gnu when compiling the glibc with the -m32 option.

My question: Is there any safe way to obtain the right host triplet for each glibc build? Or is there an easier way to build the related glibcs for a multilib gcc?

Just to make it clear: I'm not having any issues to build any of my multilib toolchains, I'm just looking for a generic way to build them, and the missing information w.r.t. the right host triplet is just annoying :-).

Many thanks for any suggestions,

Chris 



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