Comment 16 for bug 598389

Revision history for this message
Loïc Minier (lool) wrote :

Ok, my pcre3 issue is probably unrelated; just for the record, I remember I hit this a while ago while building my own cross-toolchains: libtool insists adding -L/usr/lib to the build while libs are only in /usr/$triplet/lib; this causes the linker to try to link against the libs from the build system rather than the target libs first. The linker would actually skip over the x86 /usr/lib/libm.so if it knew it is an x86 lib, but it doesn't unless configured with --enable-target=$(triplet of build system).

I used this gross hack of adding an --enable-target= for the build system back then, simply because the number of upstreams using libtool was too big and I didn't have time to identify a libtool fix. I believe the right way is to solve libtool. The issue with the hack is that it would allow doing the wrong thing when cross-building e.g. armv5 on armv6 or vice-versa, or i686 on i586 etc.