bin/mklib: remove '-m32' for arm linux
authorHan Shen(沈涵) <shenhan@google.com>
Mon, 23 Apr 2012 14:28:12 +0000 (08:28 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 23 Apr 2012 19:27:07 +0000 (13:27 -0600)
-m32 is not a valid option for ARM.

NOTE: This is a candidate for the 8.0 branch.

Signed-off-by: Brian Paul <brianp@vmware.com>
bin/mklib

index 56e0b36d146233aa7060f55f77b0ed3461be315b..9bac29ea85924af510bbbe2a53cd3ef207a3e4bc 100755 (executable)
--- a/bin/mklib
+++ b/bin/mklib
@@ -334,7 +334,9 @@ case $ARCH in
            # environment.  If so, pass -m32 flag to linker.
            set ${OBJECTS}
            ABI32=`file $1 | grep 32-bit`
-           if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+           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
 
@@ -391,7 +393,9 @@ case $ARCH in
            # environment.  If so, pass -m32 flag to linker.
            set ${OBJECTS}
            ABI32=`file $1 | grep 32-bit`
-           if [ "${ABI32}" -a `uname -m` = "x86_64" ] ; then
+            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
             if [ "${ALTOPTS}" ] ; then