Mesa (master): Cygwin build fix: Fix linkage

Brian Paul brianp at kemper.freedesktop.org
Sat Feb 20 16:24:40 UTC 2010


Module: Mesa
Branch: master
Commit: e3114d3f0ff45f6e3ef38c59cceb9b6923b7b0eb
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e3114d3f0ff45f6e3ef38c59cceb9b6923b7b0eb

Author: Jon TURNEY <jon.turney at dronecode.org.uk>
Date:   Fri Feb 19 22:38:00 2010 +0000

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 <jon.turney at dronecode.org.uk>
Signed-off-by: Brian Paul <brianp at vmware.com>

---

 bin/mklib |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/bin/mklib b/bin/mklib
index c4b3478..06e8029 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -936,7 +936,14 @@ 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}`
+
+            # remove temporary extracted .o files
+            rm -rf ${LIBNAME}.obj
         else
 	    OPTS="-shared -Wl,--enable-auto-image-base -Wl,-export-all -Wl,--out-implib=${LIBNAME}-${MAJOR}.dll.a"
             if [ "${ALTOPTS}" ] ; then




More information about the mesa-commit mailing list