if building 32-bit objects in 64-bit environment, use -m32 flag

This commit is contained in:
Brian Paul 2005-03-03 01:38:13 +00:00
parent fff3b2f318
commit 3e1961839e
1 changed files with 9 additions and 0 deletions

View File

@ -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