pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/compiler gcc.mk: Add support for MKPIE when compili...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e11648cf99d0
branches:  trunk
changeset: 456567:e11648cf99d0
user:      nia <nia%pkgsrc.org@localhost>
date:      Tue Aug 03 07:19:20 2021 +0000

description:
gcc.mk: Add support for MKPIE when compiling Fortran code.

PR pkg/56337

diffstat:

 mk/compiler/gcc.mk |  6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diffs (34 lines):

diff -r 5725ec299ffe -r e11648cf99d0 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Tue Aug 03 03:45:25 2021 +0000
+++ b/mk/compiler/gcc.mk        Tue Aug 03 07:19:20 2021 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.225 2021/08/01 12:35:06 nia Exp $
+# $NetBSD: gcc.mk,v 1.226 2021/08/03 07:19:20 nia Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -387,13 +387,16 @@
 _MKPIE_CFLAGS.gcc=     -fPIC
 # XXX for executables it should be:
 #_MKPIE_CFLAGS.gcc=    -fPIE
+_MKPIE_FCFLAGS.gcc=    -fPIC
 # XXX for libraries a sink wrapper around gcc is required and used instead
 _MKPIE_LDFLAGS.gcc=    -pie
 
 _GCC_CFLAGS+=          ${_MKPIE_CFLAGS.gcc}
+_GCC_FCFLAGS+=         ${_MKPIE_FCFLAGS.gcc}
 #_GCC_LDFLAGS+=                ${_MKPIE_LDFLAGS.gcc}
 CWRAPPERS_APPEND.cc+=  ${_MKPIE_CFLAGS.gcc}
 CWRAPPERS_APPEND.cxx+= ${_MKPIE_CFLAGS.gcc}
+CWRAPPERS_APPEND.f77+= ${_MKPIE_FCFLAGS.gcc}
 # this differs for libraries and executables (handled in mk/cwrappers.mk)
 # CWRAPPERS_APPEND.ld+=        ${_MKPIE_LDFLAGS.gcc}
 .endif
@@ -447,6 +450,7 @@
 .endif
 
 CFLAGS+=       ${_GCC_CFLAGS}
+FCFLAGS+=      ${_GCC_FCFLAGS}
 
 .if !empty(_NEED_GCC2:M[yY][eE][sS])
 #



Home | Main Index | Thread Index | Old Index