summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Weiss <algrs@cacography.net>2010-02-27 14:47:43 -0500
committerDan Nicholson <dbn.lists@gmail.com>2010-02-28 00:55:03 -0800
commit54f9c509a1eddfa7b2600ef4e4c18c2e212f6d51 (patch)
tree068c3b7f9d17c5bc3abd9b7031e643a94f1f1173
parent909c08d177638a6318382a70eee6e05ed67efd81 (diff)
Fixed mklib to properly merge static libraries on darwin.
Signed-off-by: Dan Nicholson <dbn.lists@gmail.com>
-rwxr-xr-xbin/mklib12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/mklib b/bin/mklib
index 7f2272584e..08ef99ec10 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -743,12 +743,20 @@ case $ARCH in
if [ $STATIC = 1 ] ; then
LIBNAME="lib${LIBNAME}.a"
echo "mklib: Making Darwin static library: " ${LIBNAME}
- LINK="ar"
OPTS="-ruvs"
if [ "${ALTOPTS}" ] ; then
OPTS=${ALTOPTS}
fi
- ${LINK} ${OPTS} ${LIBNAME} ${OBJECTS}
+
+ # expand .a into .o files
+ NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS`
+
+ # make static lib
+ FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}`
+
+ # remove temporary extracted .o files
+ rm -rf ${LIBNAME}.obj
+
FINAL_LIBS=${LIBNAME}
else
# On Darwin a .bundle is used for a library that you want to dlopen