[Mesa-dev] [PATCH] bin/mklib: remove '-m32' for arm linux
Han Shen(沈涵)
shenhan at google.com
Fri Apr 20 16:05:49 PDT 2012
Hi I am working on chromium, and while I was compiling mesa-8.0 for
arm linux, I found '-m32' gets added to the mklib OPTS, which is not a
valid option for arm gcc compiler.
I attached a simple patch for this, could some one take a look at this?
Do not add '-m32' to arm compiler options.
diff -rupN Mesa-8.0-p1/bin/mklib.orig Mesa-8.0-p1/bin/mklib
--- Mesa-8.0-p1/bin/mklib.orig 2012-03-01 15:55:58.000000000 -0800
+++ Mesa-8.0-p1/bin/mklib 2012-04-20 14:53:40.863683800 -0700
@@ -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
Thanks,
-Han
More information about the mesa-dev
mailing list