dev-dct-process-latest - makefiles: fix linking of PIE code
Gitweb: http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=b72e9d3a933fd72eb4c08f13f5a3d3a7259a7741 Commit: b72e9d3a933fd72eb4c08f13f5a3d3a7259a7741 Parent: d450c7fb102652985a7271f3ea76ed72235060e7 Author: Zdenek Kabelac <[email protected]> AuthorDate: Thu Sep 18 18:14:21 2014 +0200 Committer: Zdenek Kabelac <[email protected]> CommitterDate: Thu Sep 18 18:14:21 2014 +0200
makefiles: fix linking of PIE code
PIE documentation:
:
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html
http://lfs.osuosl.org/hlfs/view/unstable/glibc/chapter02/pie.html
suggest to suply -fPIE (or -fpie) with -pie
during executable compilation.
When -fPIC and -fPIE are used together - -fPIE wins
Drop usage of -DPIE - we are not using this flag anywhere
TODO: cleanup linking flags
--- make.tmpl.in | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
make.tmpl.in +2 -2
@@ -158,8 +158,8 @@ endif ifneq ("@STATIC_LINK@", "yes") ifeq ("@HAVE_PIE@", "yes") ifeq ("@HAVE_FULL_RELRO@", "yes") - EXTRA_EXEC_CFLAGS += -fPIE -DPIE - EXTRA_EXEC_LDFLAGS += -Wl,-z,relro,-z,now -pie + EXTRA_EXEC_CFLAGS += -fPIE + EXTRA_EXEC_LDFLAGS += -Wl,-z,relro,-z,now -pie -fPIE CLDFLAGS += -Wl,-z,relro endif endif