From 3e1961839ee570fe3b1257ceaf88d630635c0349 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 3 Mar 2005 01:38:13 +0000 Subject: [PATCH] if building 32-bit objects in 64-bit environment, use -m32 flag --- bin/mklib | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/mklib b/bin/mklib index 6affa66a1fd..1e2a1649c8c 100755 --- a/bin/mklib +++ b/bin/mklib @@ -173,6 +173,15 @@ case $ARCH in OPTS="${OPTS} -Xlinker --version-script=exptmp" # exptmp is removed below fi + + # Check if objects are 32-bit and we're running in 64-bit + # environment. If so, pass -m32 flag to linker. + set ${OBJECTS} + ABI32=`file $1 | grep 32-bit` + if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then + OPTS="-m32 ${OPTS}" + fi + if [ x${PATCH} = "x" ] ; then VERSION="${MAJOR}.${MINOR}" else -- 2.30.2