Package: herbstluftwm
Version: 0.1+git2011.10.09-1
Severity: wishlist
User: [email protected]
Usertags: ld-as-needed
Tags: patch

herbstluftwm fails to build with ld --as-needed.
With --as-needed libraries need to be placed before objects needing
their symbols.

See the ubuntu buildlog for the failure:
https://launchpadlibrarian.net/83460719/buildlog_ubuntu-precise-i386.herbstluftwm_0.1%2Bgit2011.10.09-1_FAILEDTOBUILD.txt.g

This patch should fix the issue:
--- herbstluftwm-0.1+git2011.10.09.orig/rules.mk
+++ herbstluftwm-0.1+git2011.10.09/rules.mk
@@ -17,7 +17,7 @@ rb: clean all

 $(TARGET): $(OBJ)
        $(call colorecho,LD,$(TARGET))
-       @$(LD) -o $@ $(LDFLAGS)  $(OBJ)
+       @$(LD) -o $@ $(LDFLAGS)  $(OBJ) $(LIBS)

 $(SRCDIR)/%.o: $(SRCDIR)/%.c $(HEADER)
        $(call colorecho,CC,$<)
--- herbstluftwm-0.1+git2011.10.09.orig/config.mk
+++ herbstluftwm-0.1+git2011.10.09/config.mk
@@ -15,7 +15,7 @@ VERSIONFLAGS = \
     -D HERBSTLUFT_VERSION_MAJOR=$(VERSION_MAJOR) \
     -D HERBSTLUFT_VERSION_MINOR=$(VERSION_MINOR)
 CFLAGS += $(VERSIONFLAGS)
-LDFLAGS = -g ${LIBS}
+LDFLAGS = -g
 PREFIX = ./build
 BINDIR = $(PREFIX)/bin
 SHAREDIR = $(PREFIX)/share


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to