Hello,

On Sat, Feb 18, 2012 at 10:17:53AM +0000, peter green wrote:
> Package: picolisp
> Version: 3.0.9.3-1
> severity: important
> tags: patch
> 
> Picolisp FTBFS on armhf with a PIE related error.  The attatched
> patch disables use of PIE on armhf to make the package build (it is
> already disabled on amd64)

As I see it there are two problems in the package:

1. Hardening rules are not properly passed to the build system, for that you
might need to set CFLAGS and LDFLAGS as:
  make -C src CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS=Linux 
CPU=$(DEB_HOST_ARCH_CPU) picolisp tools gate
  make -C src64 CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" OS=Linux

  This way the build system takes the flags, but FTBFS, with full hardening set.


2. amd64 and armhf arches fail because the linkage is trying to link non-PIE 
object code.

The following patch should fix the issue with -fPIE, but you are still not 
passing hardening flags to the build.
I have not been able to test on armhf, but once I do, and if you dont have 
inconvenient I shall proceed with a NMU.

diff -Naur picolisp-3.0.9.3/debian/rules picolisp-3.0.9.3.x/debian/rules
--- picolisp-3.0.9.3/debian/rules       2012-02-17 15:19:30.000000000 +0000
+++ picolisp-3.0.9.3.x/debian/rules     2012-03-05 03:34:42.000000000 +0000
@@ -5,11 +5,6 @@
 DEB_HOST_ARCH_CPU := $(shell dpkg-architecture -qDEB_HOST_ARCH_CPU)
 DEB_HOST_ARCH_OS  := $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
   
-ifeq (amd64,$(DEB_HOST_ARCH_CPU))
-  # disabled on amd64
-  DEB_BUILD_HARDENING_PIE := 0
-endif
-
 include /usr/share/hardening-includes/hardening.make
 export CFLAGS=$(shell dpkg-buildflags --get CFLAGS)
 export LDFLAGS=$(shell dpkg-buildflags --get LDFLAGS)
diff -Naur picolisp-3.0.9.3/src/Makefile picolisp-3.0.9.3.x/src/Makefile
--- picolisp-3.0.9.3/src/Makefile       2012-03-05 03:29:47.000000000 +0000
+++ picolisp-3.0.9.3.x/src/Makefile     2012-03-05 03:28:25.000000000 +0000
@@ -13,7 +13,7 @@
        -W -Wimplicit -Wreturn-type -Wunused -Wformat \
        -Wuninitialized -Wstrict-prototypes \
        -D_GNU_SOURCE  -D_FILE_OFFSET_BITS=64
-
+CFLAGS += -fPIE
 
 OS ?=
 LDFLAGS ?=
diff -Naur picolisp-3.0.9.3/src64/Makefile picolisp-3.0.9.3.x/src64/Makefile
--- picolisp-3.0.9.3/src64/Makefile     2012-03-05 03:29:47.000000000 +0000
+++ picolisp-3.0.9.3.x/src64/Makefile   2012-03-05 03:28:45.000000000 +0000
@@ -24,6 +24,7 @@
        endif
 endif
 
+CFLAGS += -fPIE
 OS ?=
 LDFLAGS ?=
   

Regards,
-- 
  Hector Oron



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to