From 54f9c509a1eddfa7b2600ef4e4c18c2e212f6d51 Mon Sep 17 00:00:00 2001 From: Alex Weiss Date: Sat, 27 Feb 2010 14:47:43 -0500 Subject: Fixed mklib to properly merge static libraries on darwin. Signed-off-by: Dan Nicholson --- bin/mklib | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'bin/mklib') diff --git a/bin/mklib b/bin/mklib index 7f2272584e5..08ef99ec105 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 -- cgit v1.2.3 From 5d66fc6e3a78f3ebdbeac647a786063293750abb Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Fri, 12 Mar 2010 19:03:41 -0800 Subject: mklib: Fix amd64 builds on Solaris when using Sun compilers Signed-off-by: Alan Coopersmith --- bin/mklib | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'bin/mklib') diff --git a/bin/mklib b/bin/mklib index 08ef99ec105..c2760e5d892 100755 --- a/bin/mklib +++ b/bin/mklib @@ -494,13 +494,16 @@ case $ARCH in OPTS="${OPTS} -Wl,-Mmapfile.scope" fi - # Check if objects are SPARC v9 + # Check if objects are 64-bit # file says: ELF 64-bit MSB relocatable SPARCV9 Version 1 set ${OBJECTS} if [ ${LINK} = "cc" -o ${LINK} = "CC" ] ; then - SPARCV9=`file $1 | grep SPARCV9` - if [ "${SPARCV9}" ] ; then - OPTS="${OPTS} -xarch=v9" + ABI64=`file $1 | grep "ELF 64-bit"` + if [ "${ABI64}" ] ; then + case `uname -p` in + sparc) OPTS="${OPTS} -xarch=v9" ;; + i386) OPTS="${OPTS} -xarch=amd64" ;; + esac fi fi if [ "${ALTOPTS}" ] ; then -- cgit v1.2.3