pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk/wrapper



Module Name:    pkgsrc
Committed By:   khorben
Date:           Thu Nov 16 00:36:10 UTC 2017

Modified Files:
        pkgsrc/mk/wrapper: bsd.wrapper.mk cmd-sink-mkpie-gcc

Log Message:
Obtain the MKPIE flags from the environment

This solves an issue with the command sink component of the MKPIE
wrapper for GCC, where the contents of the _MKPIE_CFLAGS.gcc and
_MKPIE_LDFLAGS.gcc variables was guessed. It is now communicated to
cmd-sink-mkpie-gcc through the environment instead.


To generate a diff of this commit:
cvs rdiff -u -r1.97 -r1.98 pkgsrc/mk/wrapper/bsd.wrapper.mk
cvs rdiff -u -r1.4 -r1.5 pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc

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

Modified files:

Index: pkgsrc/mk/wrapper/bsd.wrapper.mk
diff -u pkgsrc/mk/wrapper/bsd.wrapper.mk:1.97 pkgsrc/mk/wrapper/bsd.wrapper.mk:1.98
--- pkgsrc/mk/wrapper/bsd.wrapper.mk:1.97       Fri Mar 11 23:03:31 2016
+++ pkgsrc/mk/wrapper/bsd.wrapper.mk    Thu Nov 16 00:36:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.97 2016/03/11 23:03:31 khorben Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.98 2017/11/16 00:36:10 khorben Exp $
 #
 # Copyright (c) 2005 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -313,6 +313,11 @@ _WRAP_TRANSFORM.CC=        ${WRAPPER_TMPDIR}/tr
 _WRAP_TRANSFORM.CXX=   ${_WRAP_TRANSFORM.CC}
 . if ${_PKGSRC_MKPIE} != "no"
 _WRAP_CMD_SINK.CC=     ${WRAPPER_TMPDIR}/cmd-sink-mkpie-gcc
+_WRAP_CMD_SINK.CXX=    ${_WRAP_CMD_SINK.CC}
+MKPIE_CFLAGS=          ${_MKPIE_CFLAGS.gcc}
+.export MKPIE_CFLAGS
+MKPIE_LDFLAGS=         ${_MKPIE_LDFLAGS.gcc}
+.export MKPIE_LDFLAGS
 . endif
 .endif
 

Index: pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc
diff -u pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc:1.4 pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc:1.5
--- pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc:1.4    Thu Nov 16 00:31:47 2017
+++ pkgsrc/mk/wrapper/cmd-sink-mkpie-gcc        Thu Nov 16 00:36:10 2017
@@ -1,4 +1,4 @@
-# $NetBSD: cmd-sink-mkpie-gcc,v 1.4 2017/11/16 00:31:47 khorben Exp $
+# $NetBSD: cmd-sink-mkpie-gcc,v 1.5 2017/11/16 00:36:10 khorben Exp $
 #
 # Copyright (c) 2016 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -31,9 +31,8 @@
 
 # Append any optional flags required when linking binaries.
 if $test "$dont_link_binary" != "yes"; then
-       # XXX obtain these flags from _MKPIE_LDFLAGS.gcc and _MKPIE_CFLAGS.gcc
-       MKPIE_FLAGS="-pie"
-       $test "$has_source" = "yes" && MKPIE_FLAGS="-fPIC $MKPIE_FLAGS"
+       MKPIE_FLAGS="$MKPIE_LDFLAGS"
+       $test "$has_source" = "yes" && MKPIE_FLAGS="$MKPIE_CFLAGS $MKPIE_FLAGS"
        for arg in $MKPIE_FLAGS; do
                $debug_log $wrapperlog "    (cmd-sink-mkpie-gcc) pop:  $arg"
                . $buildcmd



Home | Main Index | Thread Index | Old Index