Mesa (mesa_7_6_branch): darwin: mklib: Use lipo rather than file to figure out architectures of object files
Jeremy Huddleston
jeremyhu at kemper.freedesktop.org
Mon Dec 21 05:37:12 UTC 2009
Module: Mesa
Branch: mesa_7_6_branch
Commit: b96a5df5141390b5cb31c0eac6449239c6cb750e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b96a5df5141390b5cb31c0eac6449239c6cb750e
Author: Jeremy Huddleston <jeremy at vincent.local>
Date: Sun Dec 20 21:34:27 2009 -0800
darwin: mklib: Use lipo rather than file to figure out architectures of object files
(cherry picked from commit ad7f9d71e22fb7667c90dbbc0558939b89a45154)
---
bin/mklib | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diff --git a/bin/mklib b/bin/mklib
index db97087..3bec160 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -724,22 +724,10 @@ case $ARCH in
# examine first object to determine ABI
set ${OBJECTS}
- ABI_PPC=`file $1 | grep ' ppc'`
- ABI_I386=`file $1 | grep ' i386'`
- ABI_PPC64=`file $1 | grep ' ppc64'`
- ABI_X86_64=`file $1 | grep ' x86_64'`
- if [ "${ABI_PPC}" ] ; then
- OPTS="${OPTS} -arch ppc"
- fi
- if [ "${ABI_I386}" ] ; then
- OPTS="${OPTS} -arch i386"
- fi
- if [ "${ABI_PPC64}" ] ; then
- OPTS="${OPTS} -arch ppc64"
- fi
- if [ "${ABI_X86_64}" ] ; then
- OPTS="${OPTS} -arch x86_64"
- fi
+ ABIS=`lipo -info $1 | sed s/.*://`
+ for ABI in $ABIS; do
+ OPTS="${OPTS} -arch ${ABI}"
+ done
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
More information about the mesa-commit
mailing list