summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorJeremy Huddleston <[email protected]>2008-02-19 00:54:35 -0800
committerJeremy Huddleston <[email protected]>2008-02-19 00:55:11 -0800
commit9993ccce690e5811a48f9b1a5e2155db446187b0 (patch)
tree43f6ca1bf64113ce25be99947f471a45d81f3af9 /bin
parentd8c187fed78ef99bed47bf261464c8c31ed13302 (diff)
Apple: Pulled in changes from Apple's patchset to allow mesa to build on darwin again
(cherry picked from commit e70609b7b877dc0d8e67c958c453305e78f831df)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/mklib38
1 files changed, 27 insertions, 11 deletions
diff --git a/bin/mklib b/bin/mklib
index b21658797a0..90bf834b435 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -624,19 +624,33 @@ case $ARCH in
LIBSUFFIX="dylib"
OPTS="${ARCHOPT} -dynamiclib -multiply_defined suppress -current_version ${MAJOR}.${MINOR}.0 -compatibility_version ${MAJOR}.${MINOR}.0 -install_name lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
fi
- LINKNAME="lib${LIBNAME}.${LIBSUFFIX}"
- LIBNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+
+ if [ ${EXPORTS} ] ; then
+ OPTS="${OPTS} -exported_symbols_list ${EXPORTS}"
+ fi
+
+ LINKNAME="lib${LIBNAME}.${MAJOR}.${LIBSUFFIX}"
+ LINKNAME2="lib${LIBNAME}.${LIBSUFFIX}"
+ LIBNAME="lib${LIBNAME}.${MAJOR}.${MINOR}.${LIBSUFFIX}"
# examine first object to determine ABI
set ${OBJECTS}
- ABI_PPC=`file $1 | grep 'object ppc'`
- ABI_I386=`file $1 | grep 'object i386'`
- if [ "${ABI_PPC}" ] ; then
- OPTS="${OPTS} -arch ppc"
- fi
- if [ "${ABI_I386}" ] ; then
- OPTS="${OPTS} -arch i386"
- fi
+ 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
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
@@ -653,9 +667,11 @@ case $ARCH in
fi
echo "mklib: Making Darwin shared library: " ${LIBNAME}
+
${LINK} ${OPTS} ${LDFLAGS} -o ${LIBNAME} ${OBJECTS} ${DEPS}
ln -s ${LIBNAME} ${LINKNAME}
- FINAL_LIBS="${LIBNAME} ${LINKNAME}"
+ ln -s ${LIBNAME} ${LINKNAME2}
+ FINAL_LIBS="${LIBNAME} ${LINKNAME} ${LINKNAME2}"
fi
;;