On 04/15/15 at 08:30am, Dave Young wrote:
Hi,
If there's benefits to harden all packages maybe it is a good idea
to submit this to upstream.
btw, External LDFLAGS will overwrite the one in Makefile?
Seems not. You can see "-fPIC" is specified as below.
cc -g -O2 -Wall -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -DVERSION='"1.5.7"' -DRELEASE_DATE='"18
Sep 2014"'
-D__x86_64__ -DUSELZO -DUSESNAPPY -fPIC print_info.o dwarf_info.o
elf_info.o erase_info.o sadump_info.o cache.o arch/arm.o arch/x86.o
arch/x86_64.o arch/ia64.o arch/ppc64.o arch/s390x.o arch/ppc.o -rdynamic
-o makedumpfile makedumpfile.c -lsnappy -llzo2 -ldw -lbz2 -lebl -ldl
-lelf -lz
----- Original Message -----
From: "Baoquan He" <bhe(a)redhat.com>
To: kexec(a)lists.fedoraproject.org
Cc: "Baoquan He" <bhe(a)redhat.com>
Sent: Wednesday, April 15, 2015 5:57:21 PM
Subject: [PATCH] add fPIC to makefumpfile CFLAGS to support hardening
Beginning from f23 program hardening become the defaults for all packages.
Details can be check from below link:
https://fedoraproject.org/wiki/Changes/Harden_All_Packages
Adding this to makedumpfile CFLAGS, otherwise makedumpfile building will
fail on koji.
Signed-off-by: Baoquan He <bhe(a)redhat.com>
---
kexec-tools.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 5896269..cf2b0f5 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -128,7 +128,7 @@ cp %{SOURCE21} .
make
%ifarch %{ix86} x86_64 ppc64 s390x ppc64le
make -C eppic/libeppic
-make -C makedumpfile-1.5.7 LINKTYPE=dynamic USELZO=on USESNAPPY=on
+make -C makedumpfile-1.5.7 LINKTYPE=dynamic USELZO=on USESNAPPY=on
LDFLAGS="-fPIC"
make -C makedumpfile-1.5.7 LDFLAGS="-I../eppic/libeppic -L../eppic/libeppic"
eppic_makedumpfile.so
%endif
make -C kdump-anaconda-addon/po
--
1.9.3
_______________________________________________
kexec mailing list
kexec(a)lists.fedoraproject.org
https://lists.fedoraproject.org/mailman/listinfo/kexec