Package: pps-tools Version: 1.0.1-1 Severity: wishlist Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu bionic ubuntu-patch
Dear Bernd, The latest version of pps-tools has failed to build in Ubuntu, because one of the programs uses libm but the Makefile passes -lm in a way that is incompatible with -Wl,--as-needed, which is a default linker flag in Ubuntu. The attached patch, which is more strictly correct, fixes the build failure in Ubuntu. Please consider applying it in Debian. -- Steve Langasek Give me a lever long enough and a Free OS Debian Developer to set it on, and I can move the world. Ubuntu Developer http://www.debian.org/ slanga...@ubuntu.com vor...@debian.org
diff -Nru pps-tools-1.0.1/debian/patches/linker-flag-order.patch pps-tools-1.0.1/debian/patches/linker-flag-order.patch --- pps-tools-1.0.1/debian/patches/linker-flag-order.patch 1969-12-31 16:00:00.000000000 -0800 +++ pps-tools-1.0.1/debian/patches/linker-flag-order.patch 2018-02-02 21:50:06.000000000 -0800 @@ -0,0 +1,20 @@ +Description: fix linking under -Wl,--as-needed + Ubuntu's linker uses -Wl,--as-needed by default, which causes ppswatch + to fail to link because of the order of options on the commandline. Add + -lm to LDLIBS instead of LDFLAGS, which will cause it to be passed in + the right order. +Author: Steve Langasek <steve.langa...@ubuntu.com> + +Index: pps-tools-1.0.1/Makefile +=================================================================== +--- pps-tools-1.0.1.orig/Makefile ++++ pps-tools-1.0.1/Makefile +@@ -3,7 +3,7 @@ + CFLAGS += -Wall -O2 -D_GNU_SOURCE + CFLAGS += -ggdb + CFLAGS += -fPIC +-LDFLAGS += -lm ++LDLIBS += -lm + + # -- Actions section -- + diff -Nru pps-tools-1.0.1/debian/patches/series pps-tools-1.0.1/debian/patches/series --- pps-tools-1.0.1/debian/patches/series 1969-12-31 16:00:00.000000000 -0800 +++ pps-tools-1.0.1/debian/patches/series 2018-02-02 21:42:30.000000000 -0800 @@ -0,0 +1 @@ +linker-flag-order.patch