summaryrefslogtreecommitdiff
path: root/bin/mklib
diff options
context:
space:
mode:
Diffstat (limited to 'bin/mklib')
-rwxr-xr-xbin/mklib17
1 files changed, 17 insertions, 0 deletions
diff --git a/bin/mklib b/bin/mklib
index a3e826abac..db3bc8325f 100755
--- a/bin/mklib
+++ b/bin/mklib
@@ -176,6 +176,23 @@ if [ ${ARCH} = "auto" ] ; then
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
#