Package: einstein
Version: 2.0.dfsg.2-7
Severity: normal
Tags: patch
User: debian-...@lists.debian.org
Usertags: ld-as-needed

Linking with ld --as-needed exposes an unusual link order (libraries before 
objects on the command line).

I have fixed this in Ubuntu with the attached patch.

Thanks for considering it.
--- einstein-2.0.dfsg.2.orig/debian/patches/13_ld-as-needed.diff
+++ einstein-2.0.dfsg.2/debian/patches/13_ld-as-needed.diff
@@ -0,0 +1,31 @@
+--- einstein-2.0.dfsg.2.orig/Makefile
++++ einstein-2.0.dfsg.2/Makefile
+@@ -17,7 +17,8 @@
+ PROFILER=#-pg
+ DEBUG=#-ggdb
+ CXXFLAGS=-pipe -Wall $(OPTIMIZE) $(DEBUG) `sdl-config --cflags` 
-DPREFIX=L\"$(PREFIX)\" $(PROFILER)
+-LNFLAGS=-pipe -lSDL_ttf -lfreetype `sdl-config --libs` -lz -lSDL_mixer 
$(PROFILER)
++LNFLAGS=-pipe $(PROFILER)
++LIBS=-lSDL_ttf -lfreetype `sdl-config --libs` -lz -lSDL_mixer
+ INSTALL=install
+ 
+ TARGET=einstein
+@@ -51,7 +51,7 @@
+ $(TARGET): $(OBJECTS)
+       cd mkres && make
+       cd res && ../mkres/mkres --source resources.descr --output einstein.res
+-      $(CXX) $(LNFLAGS) $(OBJECTS) -o $(TARGET)
++      $(CXX) $(LNFLAGS) $(OBJECTS) -o $(TARGET) $(LIBS)
+ 
+ clean:
+       rm -f $(OBJECTS) core* *core $(TARGET) *~
+--- einstein-2.0.dfsg.2.orig/mkres/Makefile
++++ einstein-2.0.dfsg.2/mkres/Makefile
+@@ -1,6 +1,6 @@
+ OPTIMIZE=-O6
+ CFLAGS=-Wall $(OPTIMIZE)
+-LNFLAGS=-lz
++LIBS=-lz
+ 
+ TARGET=mkres
+ SOURCES=main.cpp compressor.cpp unicode.cpp streams.cpp table.cpp \

Reply via email to