Package: yforth
Version: 0.1beta-22
Severity: wishlist
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch precise

        Hi

 Ubuntu's toolchain is configured to set -Wl,--as-needed by default as
 to automatically strip superfluous ELF dependencies.  This change might
 be adopted to Debian in the future.

 yforth 0.1beta-22 fails to build with current Ubuntu toolchain setup; a
 simple "make" in the source tree fails with:
[...]
gcc -lm -o yforth block.o blocke.o core.o coree.o double.o doublee.o exceptio.o 
facility.o file.o filee.o float.o floate.o locals.o localse.o memall.o search.o 
searche.o string.o tools.o toolse.o udio.o vm.o ycore.o yfinit.o yforth.o 
yfvinit.o  
float.o: In function `_floor':
float.c:(.text+0x44d): undefined reference to `floorf'
float.o: In function `_f_round':
float.c:(.text+0x538): undefined reference to `floor'
[...]

 Prefixing -Wl,--no-as-needed to the gcc flags allows it to pass.

 The fix is to change Makefile as follows; instead of:
    $(CC) -o yforth $(OBJECTS) $(MATHLIB)
 use:
    $(CC) $(MATHLIB) -o yforth $(OBJECTS) $(MATHLIB)

 Attaching a debdiff to this effect.

   Thanks,
-- 
Loïc Minier
diff -u yforth-0.1beta/Makefile yforth-0.1beta/Makefile
--- yforth-0.1beta/Makefile
+++ yforth-0.1beta/Makefile
@@ -13,7 +13,7 @@
        string.h tools.h toolse.h udio.h ver.h ycore.h yforth.h 
 
 yforth: div.h $(OBJECTS)
-       $(CC) $(MATHLIB) -o yforth $(OBJECTS)
+       $(CC) -o yforth $(OBJECTS) $(MATHLIB)
 
 div.h: div
        ./div 
diff -u yforth-0.1beta/debian/changelog yforth-0.1beta/debian/changelog
--- yforth-0.1beta/debian/changelog
+++ yforth-0.1beta/debian/changelog
@@ -1,3 +1,10 @@
+yforth (0.1beta-23) UNRELEASED; urgency=low
+
+  [ Michael Bienia ]
+  * Makefile: Move $(MATHLIB) to the end of the linker call.
+
+ -- Loïc Minier <l...@dooz.org>  Wed, 09 Nov 2011 15:19:53 +0100
+
 yforth (0.1beta-22) unstable; urgency=low
 
   * add Vcs entries to the control file

Reply via email to