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]

AW: multilib build


> > $ gcc -print-multi-lib
> > .;
> > 32;@m32
> > x32;@mx32
> 
> > 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?
> 
> I think you can use the flags extracted from the above in conjunction
> with -print-multiarch, that is:
> 
> $ gcc -print-multiarch
> x86_64-linux-gnu
> $ gcc -m32 -print-multiarch
> i386-linux-gnu
> $ gcc -mx32 -print-multiarch
> x86_64-linux-gnux32

Thanks, that's a good start at least, although it is not directly usable as host triplet to build the glibc, because:

1) -print-multiarch omits the vendor part of the host triplet, causing the glibc configure script to think this is a native build instead of a cross build when building an x86 toolchain on an x86 build system
2) i386 is not supported any more by glibc, so it needs to be replaced by e.g. i686

While the first issue may be fixed within a build-script in an architecture-agnostic manner by just (re)inserting the vendor string, the second issue still requires an x86 specific hack, i.e. to replace i386 by i686. Even adding -march:

$ gcc -m32 -march=i686 -print-multiarch
i386-linux-gnu

doesn't help.

But anyway, it's still an improvement :-). Any architecture independent ideas on how to obtain the right architecture (or full host triplet) for glibc are still highly appreciated.

Cheers,

Chris 


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