darwin: mklib: Use lipo rather than file to figure out architectures of object files
This commit is contained in:
20
bin/mklib
20
bin/mklib
@@ -724,22 +724,10 @@ case $ARCH in
|
|||||||
|
|
||||||
# examine first object to determine ABI
|
# examine first object to determine ABI
|
||||||
set ${OBJECTS}
|
set ${OBJECTS}
|
||||||
ABI_PPC=`file $1 | grep ' ppc'`
|
ABIS=`lipo -info $1 | sed s/.*://`
|
||||||
ABI_I386=`file $1 | grep ' i386'`
|
for ABI in $ABIS; do
|
||||||
ABI_PPC64=`file $1 | grep ' ppc64'`
|
OPTS="${OPTS} -arch ${ABI}"
|
||||||
ABI_X86_64=`file $1 | grep ' x86_64'`
|
done
|
||||||
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
|
|
||||||
|
|
||||||
if [ "${ALTOPTS}" ] ; then
|
if [ "${ALTOPTS}" ] ; then
|
||||||
OPTS=${ALTOPTS}
|
OPTS=${ALTOPTS}
|
||||||
|
Reference in New Issue
Block a user