mesa: Prepend "-Wl," to linking options
Let mklib ignore -Wl options inside the object list when building static libraries
This commit is contained in:

committed by
Brian Paul

parent
60927f97f7
commit
9cb3cdec76
17
bin/mklib
17
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
|
||||
#
|
||||
|
@@ -60,7 +60,7 @@ $(TOP)/$(LIB_DIR)/$(DRIVER_NAME): $(WINSYS_OBJECTS) $(LIBS)
|
||||
-noprefix \
|
||||
-install $(TOP)/$(LIB_DIR) \
|
||||
$(MKLIB_OPTIONS) $(WINSYS_OBJECTS) \
|
||||
--whole-archive $(LIBS) --no-whole-archive
|
||||
-Wl,--whole-archive $(LIBS) -Wl,--no-whole-archive
|
||||
|
||||
|
||||
depend: $(ALL_SOURCES)
|
||||
|
@@ -74,7 +74,7 @@ $(TOP)/$(LIB_DIR)/gallium/$(GL_LIB_NAME): $(XLIB_WINSYS_OBJECTS) $(LIBS) Makefil
|
||||
-major $(GL_MAJOR) -minor $(GL_MINOR) -patch $(GL_TINY) \
|
||||
-install $(TOP)/$(LIB_DIR)/gallium \
|
||||
$(MKLIB_OPTIONS) $(XLIB_WINSYS_OBJECTS) \
|
||||
--start-group $(LIBS) --end-group $(GL_LIB_DEPS)
|
||||
-Wl,--start-group $(LIBS) -Wl,--end-group $(GL_LIB_DEPS)
|
||||
|
||||
|
||||
depend: $(XLIB_WINSYS_SOURCES)
|
||||
|
Reference in New Issue
Block a user