[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Package with hardening support FTBFS on amd64 and i386


I've added [1] the CFLAGS and LDFLAGS to debian/rules of my package slrn
to enable hardening of the binaries.

ifeq (,$(findstring nohardening,$(DEB_BUILD_OPTIONS)))
    # http://lists.debian.org/debian-devel-announce/2008/01/msg00006.html
    CFLAGS += -fPIC -fPIE -fstack-protector -Wformat=2 -Wextra
    export LDFLAGS += -Wl,-zrelro,-pie
    ifeq  (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))

The build went fine on all arches except i386, amd64 and m68k. I've no
idea why the build on m68k failed, but I guess the build failed on i386
and amd64, because the use gcc-4.2 while all other architectures use
gcc-4.3. The build on amd64 fails with this message [2]

configure:2586: checking for C compiler default output file name
configure:2613: gcc -g -O2 -Wall -g -O2 -fPIC -fPIE -fstack-protector -Wformat=2 -Wextra -D_FORTIFY_SOURCE=2
-Wl,-zrelro,-pie conftest.c  >&5
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/crt1.o: relocation R_X86_64_32S against
`__libc_csu_fini' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-linux-gnu/4.2.3/../../../../lib64/crt1.o: could not read symbols: Bad value
collect2: ld returned 1 exit status

What should I do?

Bye, Jörg.

[1] http://git.debian.org/?p=users/jo-guest/slrn.git;a=commit;h=238faf37e46f2bd54295e41987ecbc3959a739d3
[2] http://bugs.debian.org/478057
Wenn du nur einen Hammer hast, sieht jedes Problem aus wie ein Nagel.

Reply to: