[Pkg-wmaker-commits] [wmmoonclock] 03/15: wmMoonClock: fix build with ld --as-needed

Doug Torrance dtorrance-guest at moszumanska.debian.org
Mon Aug 14 23:32:56 UTC 2017


This is an automated email from the git hooks/post-receive script.

dtorrance-guest pushed a commit to branch upstream
in repository wmmoonclock.

commit 9e1f855519528e755bcb086d7fc6463ea3b23235
Author: Michael Bienia <geser at ubuntu.com>
Date:   Tue Nov 8 11:22:40 2011 +0100

    wmMoonClock: fix build with ld --as-needed
    
    I'm forwarding a patch from Michael Bienia <geser at ubuntu.com> that
    has been applied to the wmmoonclock package in Ubuntu.
    
    It fixes a build issue that is caused by specifiying libraries before the object
    files in the linker command line.
    This causes a build failure as Ubuntu's ld defaults to --as-needed, see:
    http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
    
    [Patch sent by: Felix Geyer <debfx at ubuntu.com>]
---
 src/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index 20f39d4..b31bdfc 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -5,10 +5,10 @@ DESTDIR= /usr/X11R6
 LIBDIR = -L/usr/X11R6/lib
 
 # for Linux
-LIBS   = -lXpm -lX11 -lXext
+LIBS   = -lXpm -lX11 -lXext -lm
 
 # for Solaris
-# LIBS   = -lXpm -lX11 -lXext -lsocket
+# LIBS   = -lXpm -lX11 -lXext -lm -lsocket
 
 OBJS   = wmMoonClock.o CalcEphem.o Moon.o MoonRise.o \
          xutils.o
@@ -22,7 +22,7 @@ all:	wmMoonClock.o wmMoonClock
 
 wmMoonClock.o: wmMoonClock_master.xpm wmMoonClock_mask.xbm CalcEphem.h
 wmMoonClock:	$(OBJS) 
-	$(CC) $(CFLAGS) $(SYSTEM) -lm -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
+	$(CC) $(CFLAGS) $(SYSTEM) -o wmMoonClock $^ $(INCDIR) $(LIBDIR) $(LIBS)
 
 clean:
 	for i in $(OBJS) ; do \

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-wmaker/wmmoonclock.git



More information about the Pkg-wmaker-commits mailing list