I'm reporting this bug because the package in summary fails to build when forcing --as-needed on through spec files (check out http://blog.flameeyes.eu/2008/11/14/problems-and-mitigation-strategies-for-as-needed for details).
Please note that this bug _might_ apply to -Wl,--as-needed in LDFLAGS as well; in both cases it should be fixed. Also, if this is due to the package in question not respecting user-defined LDFLAGS, you should get to fix that too.
Check the attached build log.
Created attachment 173990 [details]
The problem is hidden in gnustep-make itself (the make wrapper for most gnustep projects), in mknfonts case it's in /usr/GNUstep/System/Library/Makefiles/Instance/tool.make
Here is the original compilation target:
$(ECHO_LINKING)$(LD) $(ALL_LDFLAGS) $(CC_LDFLAGS) -o $(LDOUT)$@ \
mknfonts specifies "-lfreetype" in $ADDITIONAL_LDFLAGS, which is then merged in $ALL_LDFLAGS
However moving $ALL_LDFLAGS after $(OBJ_FILES_TO_LINK) results in -Wl,--as-needed appearing later on the line, example output:
i686-pc-linux-gnu-gcc -fgnu-runtime -o obj/mknfonts \
./obj/mknfonts.o -rdynamic `freetype-config --libs` -Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/GNUstep/System/Library/Libraries -Wl,-O1 -Wl,--as-needed -shared-libgcc -fexceptions \
-L/usr/GNUstep/System/Library/Libraries/./obj -L/var/tmp/portage/gnustep-base/mknfonts-0.5-r1/temp/GNUstep/Library/Libraries -L/usr/GNUstep/Local/Library/Libraries -L/usr/GNUstep/System/Library/Libraries -lgnustep-base -lobjc -lm
Is it a problem, i.e does "-Wl,--as-needed" must appear before obj files to apply correctly, or does the place not matter?
The guide states the correct order
$(LD) $(LDFLAGS) $(OBJFILES) $(LIBRARIES)
yes order does matter ;)
Fixed in CVS, in fact the incorrect ADDITIONAL_* variable was used, now the order is correct :)
Now let's check what's wrong with gorm