From: Steve Ellcey Date: Mon, 19 Aug 2013 21:35:28 +0000 (-0700) Subject: libtool: set correct linker ABI flags on mips64 linux. X-Git-Tag: v2.4.2.418~35 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f7f7d9615bf650cf99d581a33b3e18357f79951;p=thirdparty%2Flibtool.git libtool: set correct linker ABI flags on mips64 linux. m4/libtool.m4 (_LT_ENABLE_LOCK): Select the n32 or n64 ABI when linking to match the ABI produced with the user's compiler flags. Co-authored-by: Gary V. Vaughan Signed-off-by: Gary V. Vaughan --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 8f97c5c9c..4418a1c3a 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1309,6 +1309,38 @@ ia64-*-hpux*) rm -rf conftest* ;; +mips64*-*linux*) + # Find out what ABI is being produced by ac_compile, and set linker + # options accordingly. + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + emul=elf + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + emul="${emul}32" + ;; + *64-bit*) + emul="${emul}64" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *MSB*) + emul="${emul}btsmip" + ;; + *LSB*) + emul="${emul}ltsmip" + ;; + esac + case `/usr/bin/file conftest.$ac_objext` in + *N32*) + emul="${emul}n32" + ;; + esac + LD="${LD-ld} -m $emul" + fi + rm -rf conftest* + ;; + x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker