mesa: Prepend "-Wl," to linking options
Let mklib ignore -Wl options inside the object list when building
static libraries
diff --git a/bin/mklib b/bin/mklib
index a3e826a..db3bc83 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -176,6 +176,23 @@
fi
+if [ $STATIC = 1 ]; then
+ # filter out linker options inside object list
+ NEWOBJECTS=""
+ for OBJ in $OBJECTS ; do
+ case $OBJ in
+ -Wl,*)
+ echo "mklib: warning: ignoring $OBJ for static library"
+ ;;
+ *)
+ NEWOBJECTS="$NEWOBJECTS $OBJ"
+ ;;
+ esac
+ done
+ OBJECTS=$NEWOBJECTS
+fi
+
+
#
# Error checking
#