diff options
author | marha <marha@users.sourceforge.net> | 2012-09-17 16:16:11 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-09-17 16:16:11 +0200 |
commit | c72f683c50e774b21967f0121245a286539fa555 (patch) | |
tree | fa5e86f04a33b8bcebf937d1966052ccf1fefbeb /mesalib/bin/mklib | |
parent | 86fb7e4a298199b30bd16565569a9b3dfe7a1f11 (diff) | |
parent | e3c4aa34268f99562e66b43a7d9efcd16ca072e6 (diff) | |
download | vcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.gz vcxsrv-c72f683c50e774b21967f0121245a286539fa555.tar.bz2 vcxsrv-c72f683c50e774b21967f0121245a286539fa555.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
mesalib/src/mesa/main/syncobj.h
pixman/pixman/pixman-mmx.c
Diffstat (limited to 'mesalib/bin/mklib')
-rw-r--r-- | mesalib/bin/mklib | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/mesalib/bin/mklib b/mesalib/bin/mklib index 9bac29ea8..086b26898 100644 --- a/mesalib/bin/mklib +++ b/mesalib/bin/mklib @@ -319,6 +319,25 @@ case $ARCH in fi fi + # Check if objects are 32-bit and we're running in 64-bit + # environment. If so, pass -m32 flag to linker. + add_abi_flag_to_opts() { + case $(file $1) in + *32-bit*x86-64*) + # x86_64 x32 ABI. + OPTS="-mx32 ${OPTS}" + ;; + *64-bit*x86-64*) + # x86_64 64-bit ABI. + OPTS="-m64 ${OPTS}" + ;; + *32-bit*Intel*) + # x86 32-bit ABI. + OPTS="-m32 ${OPTS}" + ;; + esac + } + if [ $NOPREFIX = 1 ] ; then # No "lib" or ".so" part echo "mklib: Making" $ARCH "shared library: " ${LIBNAME} @@ -330,15 +349,8 @@ case $ARCH in ;; esac - # 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` - ARM=`file $1 | grep ARM` - # Do not add "-m32" option for arm. - if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then - OPTS="-m32 ${OPTS}" - fi + # Check to see if we are building for a different ABI. + add_abi_flag_to_opts ${OBJECTS} if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} @@ -389,15 +401,9 @@ case $ARCH in # 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` - ARM=`file $1 | grep ARM` - # Do not add "-m32" option for arm. - if [ -z "$ARM" -a "${ABI32}" -a `uname -m` = "x86_64" ] ; then - OPTS="-m32 ${OPTS}" - fi + # Check to see if we are building for a different ABI. + add_abi_flag_to_opts ${OBJECTS} + if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi |