projects
/
profile
/
ivi
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
da5741c
)
darwin: mklib: Use lipo rather than file to figure out architectures of object files
author
Jeremy Huddleston
<jeremy@vincent.local>
Mon, 21 Dec 2009 05:34:27 +0000
(21:34 -0800)
committer
Jeremy Huddleston
<jeremyhu@freedesktop.org>
Mon, 21 Dec 2009 05:36:58 +0000
(21:36 -0800)
(cherry picked from commit
ad7f9d71e22fb7667c90dbbc0558939b89a45154
)
bin/mklib
patch
|
blob
|
history
diff --git
a/bin/mklib
b/bin/mklib
index
db97087
..
3bec160
100755
(executable)
--- a/
bin/mklib
+++ b/
bin/mklib
@@
-724,22
+724,10
@@
case $ARCH in
# examine first object to determine ABI
set ${OBJECTS}
# 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}
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}