Source: pasco Version: 20040505-2 Severity: serious Justification: policy 4.6 Tags: patch User: helm...@debian.org Usertags: rebootstrap
pasco fails to cross build from source, because its upstream Makefile hard codes the build architecture compiler. While fixing it, I spotted a policy 4.6 (error trapping in Makefiles) violation (hence serious). The attached patch fixes both and makes pasco cross build successfully. Please consider applying it. Helmut
diff --minimal -Nru pasco-20040505/debian/changelog pasco-20040505/debian/changelog --- pasco-20040505/debian/changelog 2017-01-26 00:04:03.000000000 +0100 +++ pasco-20040505/debian/changelog 2018-05-19 13:33:09.000000000 +0200 @@ -1,3 +1,10 @@ +pasco (20040505-2.1) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Fix the upstream Makefile. (Closes: #-1) + + -- Helmut Grohne <hel...@subdivi.de> Sat, 19 May 2018 13:33:09 +0200 + pasco (20040505-2) unstable; urgency=medium * Team upload. diff --minimal -Nru pasco-20040505/debian/patches/10_add-GCC-hardening.patch pasco-20040505/debian/patches/10_add-GCC-hardening.patch --- pasco-20040505/debian/patches/10_add-GCC-hardening.patch 2015-07-13 00:34:07.000000000 +0200 +++ pasco-20040505/debian/patches/10_add-GCC-hardening.patch 2018-05-19 13:33:09.000000000 +0200 @@ -1,14 +1,23 @@ Last-Update: 2015-07-12 Index: pasco-1.0+20040505/src/Makefile =================================================================== + +Also use $(CC) for cross building. + +And fix the policy 4.6 violation. + --- pasco-1.0+20040505.orig/src/Makefile +++ pasco-1.0+20040505/src/Makefile -@@ -1,7 +1,7 @@ +@@ -1,7 +1,10 @@ all: install - install: pasco.c +-install: pasco.c - gcc -o pasco pasco.c -lm -lc;cp pasco ../bin -+ gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o pasco pasco.c -lm -lc;cp pasco ../bin ++pasco: pasco.c ++ $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $< -lm -lc ++ ++install: pasco ++ cp pasco ../bin installwin: pasco.c gcc -DCYGWIN -o pasco.exe pasco.c -lm -lc;cp pasco.exe ../bin