pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/compiler



Module Name:    pkgsrc
Committed By:   khorben
Date:           Tue Nov  7 16:57:58 UTC 2017

Modified Files:
        pkgsrc/mk/compiler: gcc.mk

Log Message:
Always add "-fPIC" when linking with PKGSRC_MKPIE

This makes sure a simple "cc -o hello hello.c" will still build a valid
executable. It does not let us detect when CFLAGS or LDFLAGS are
ignored anymore, but it is legitimate for packages to expect it to work
without any additional parameter.

ld(1) does not expect "-fPIC" but it seems to be ignored by our wrappers
in this case, so no disruption is expected there.


To generate a diff of this commit:
cvs rdiff -u -r1.185 -r1.186 pkgsrc/mk/compiler/gcc.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.185 pkgsrc/mk/compiler/gcc.mk:1.186
--- pkgsrc/mk/compiler/gcc.mk:1.185     Tue Oct  3 09:38:16 2017
+++ pkgsrc/mk/compiler/gcc.mk   Tue Nov  7 16:57:58 2017
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.185 2017/10/03 09:38:16 jperkin Exp $
+# $NetBSD: gcc.mk,v 1.186 2017/11/07 16:57:58 khorben Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -336,7 +336,7 @@ _MKPIE_CFLAGS.gcc=  -fPIC
 # XXX for executables it should be:
 #_MKPIE_CFLAGS.gcc=    -fPIE
 # XXX for libraries a sink wrapper around gcc is required and used instead
-_MKPIE_LDFLAGS.gcc=    -pie
+_MKPIE_LDFLAGS.gcc=    -fPIC -pie
 .endif
 
 .if ${_PKGSRC_MKPIE} == "yes"



Home | Main Index | Thread Index | Old Index