From ba00fdda366c99935736c7abea2942ae37048c1e Mon Sep 17 00:00:00 2001 From: Jon TURNEY Date: Thu, 18 Feb 2010 23:34:05 +0000 Subject: [PATCH] Cygwin build fix: Fix linkage Fix the way we make static convenience libraries, such as libmesa.a, to be the same as linux etc. Putting archives inside archives doesn't make the objects inside the archive linkable, so use expand_archives() to get all the objects inside an archive out again before linking. Signed-off-by: Jon TURNEY --- bin/mklib | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/bin/mklib b/bin/mklib index 3127e8c..94f75d5 100755 --- a/bin/mklib +++ b/bin/mklib @@ -961,7 +961,11 @@ case $ARCH in if [ "${ALTOPTS}" ] ; then OPTS=${ALTOPTS} fi - FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${OBJECTS}` + + # expand .a into .o files + NEW_OBJECTS=`expand_archives ${LIBNAME}.obj $OBJECTS` + + FINAL_LIBS=`make_ar_static_lib ${OPTS} 1 ${LIBNAME} ${NEW_OBJECTS}` else OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a" if [ "${ALTOPTS}" ] ; then -- 1.6.6.1