On Wed, Apr 29, 2009 at 3:39 PM, Tormod Volden <lists.tor...@gmail.com> wrote: > From: Tormod Volden <debian.tor...@gmail.com> > > Prepend "-Wl," to linking options and let mklib ignore -Wl options > inside the object list when building static libraries > --- > bin/mklib | 12 ++++++++++++ > src/gallium/winsys/egl_xlib/Makefile | 2 +- > src/gallium/winsys/xlib/Makefile | 2 +- > 3 files changed, 14 insertions(+), 2 deletions(-) > > diff --git a/bin/mklib b/bin/mklib > index a3e826a..47a2ebc 100755 > --- a/bin/mklib > +++ b/bin/mklib > @@ -175,6 +175,18 @@ if [ ${ARCH} = "auto" ] ; then > ARCH=`uname` > fi > > +if [ $STATIC = 1 ]; then > + # filter out linker options inside object list > + NEWOBJECTS="" > + for OBJ in $OBJECTS ; do > + if [ `expr match $OBJ '-Wl,.*'` -gt 0 ]; then > + echo "mklib: warning: ignoring $OBJ for static > library" > + else > + NEWOBJECTS="$NEWOBJECTS $OBJ" > + fi > + done > + OBJECTS=$NEWOBJECTS > +fi
Is there any reason not to just use a case statement instead of forking expr? > > # > # Error checking > diff --git a/src/gallium/winsys/egl_xlib/Makefile > b/src/gallium/winsys/egl_xlib/Makefile > index 02ac47c..8646ee3 100644 > --- a/src/gallium/winsys/egl_xlib/Makefile > +++ b/src/gallium/winsys/egl_xlib/Makefile > @@ -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) > diff --git a/src/gallium/winsys/xlib/Makefile > b/src/gallium/winsys/xlib/Makefile > index bb187cc..04309e6 100644 > --- a/src/gallium/winsys/xlib/Makefile > +++ b/src/gallium/winsys/xlib/Makefile > @@ -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) Thanks for fixing these. -- Dan ------------------------------------------------------------------------------ Register Now & Save for Velocity, the Web Performance & Operations Conference from O'Reilly Media. Velocity features a full day of expert-led, hands-on workshops and two days of sessions from industry leaders in dedicated Performance & Operations tracks. Use code vel09scf and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel