Bug#889185: pps-tools: Please make build compatible with -Wl,--as-needed

2018-02-03 Thread Alexander Gerasiov
Hello Bernd,

On Sat, 3 Feb 2018 17:50:49 +0100
Bernd Zeimetz  wrote:

> Hi Alexander,
> 
> On 02/03/2018 12:05 PM, Alexander Gerasiov wrote:
> > Hello Steve,
> > 
> > Applied upstream.
> > 
> > Bernd, Steve, do you want me to tag it 1.0.2 ?  
> 
> yes please!
Done.

> 
> then I can just upload a new version instead of adding patches.

Exactly. Just want to know that there are no more fixes coming =)


-- 
Best regards,
 Alexander Gerasiov

 Contacts:
 e-mail: g...@cs.msu.su  WWW: http://gerasiov.net  Telegram/Skype:
 gerasiov PGP fingerprint: 04B5 9D90 DF7C C2AB CD49  BAEA CA87 E9E8
 2AAC 33F1



Bug#889185: pps-tools: Please make build compatible with -Wl,--as-needed

2018-02-03 Thread Bernd Zeimetz
Hi Alexander,

On 02/03/2018 12:05 PM, Alexander Gerasiov wrote:
> Hello Steve,
> 
> Applied upstream.
> 
> Bernd, Steve, do you want me to tag it 1.0.2 ?

yes please!

then I can just upload a new version instead of adding patches.

thanks!

Bernd

-- 
 Bernd ZeimetzDebian GNU/Linux Developer
 http://bzed.dehttp://www.debian.org
 GPG Fingerprint: ECA1 E3F2 8E11 2432 D485  DD95 EB36 171A 6FF9 435F



Bug#889185: pps-tools: Please make build compatible with -Wl,--as-needed

2018-02-03 Thread Alexander Gerasiov
Hello Steve,

Applied upstream.

Bernd, Steve, do you want me to tag it 1.0.2 ?

On Fri, 02 Feb 2018 22:54:44 -0800
Steve Langasek  wrote:

> 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.
> 



-- 
Best regards,
 Alexander Gerasiov

 Contacts:
 e-mail: g...@cs.msu.su  WWW: http://gerasiov.net  Telegram/Skype:
 gerasiov PGP fingerprint: 04B5 9D90 DF7C C2AB CD49  BAEA CA87 E9E8
 2AAC 33F1



Bug#889185: pps-tools: Please make build compatible with -Wl,--as-needed

2018-02-02 Thread Steve Langasek
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 Developerhttp://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.0 -0800
+++ pps-tools-1.0.1/debian/patches/linker-flag-order.patch  2018-02-02 
21:50:06.0 -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 
+
+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.0 
-0800
+++ pps-tools-1.0.1/debian/patches/series   2018-02-02 21:42:30.0 
-0800
@@ -0,0 +1 @@
+linker-flag-order.patch