pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk
Module Name: pkgsrc
Committed By: nia
Date: Sun Mar 13 06:26:57 UTC 2022
Modified Files:
pkgsrc/mk: cwrappers.mk
pkgsrc/mk/compiler: clang.mk gcc.mk
pkgsrc/mk/wrapper: bsd.wrapper.mk
Log Message:
mk: MKPIE is not GCC-specific. Should help ObjC packages.
To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 pkgsrc/mk/cwrappers.mk
cvs rdiff -u -r1.34 -r1.35 pkgsrc/mk/compiler/clang.mk
cvs rdiff -u -r1.235 -r1.236 pkgsrc/mk/compiler/gcc.mk
cvs rdiff -u -r1.103 -r1.104 pkgsrc/mk/wrapper/bsd.wrapper.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/cwrappers.mk
diff -u pkgsrc/mk/cwrappers.mk:1.32 pkgsrc/mk/cwrappers.mk:1.33
--- pkgsrc/mk/cwrappers.mk:1.32 Tue Jan 18 01:41:09 2022
+++ pkgsrc/mk/cwrappers.mk Sun Mar 13 06:26:57 2022
@@ -1,4 +1,4 @@
-# $NetBSD: cwrappers.mk,v 1.32 2022/01/18 01:41:09 pho Exp $
+# $NetBSD: cwrappers.mk,v 1.33 2022/03/13 06:26:57 nia Exp $
#
# This Makefile fragment implements integration of pkgtools/cwrappers.
@@ -90,7 +90,7 @@ generate-cwrappers:
. endfor
. if ${_PKGSRC_MKPIE} == "yes"
. if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no"
-. for arg in ${_MKPIE_LDFLAGS.gcc}
+. for arg in ${_MKPIE_LDFLAGS}
${RUN}echo append_executable=${arg} >> ${CWRAPPERS_CONFIG_DIR}/${CWRAPPERS_CONFIG.${wrappee}}
. endfor
. endif
Index: pkgsrc/mk/compiler/clang.mk
diff -u pkgsrc/mk/compiler/clang.mk:1.34 pkgsrc/mk/compiler/clang.mk:1.35
--- pkgsrc/mk/compiler/clang.mk:1.34 Sun Jan 30 13:07:34 2022
+++ pkgsrc/mk/compiler/clang.mk Sun Mar 13 06:26:57 2022
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.34 2022/01/30 13:07:34 wiz Exp $
+# $NetBSD: clang.mk,v 1.35 2022/03/13 06:26:57 nia Exp $
#
# This is the compiler definition for the clang compiler.
#
@@ -78,6 +78,17 @@ CWRAPPERS_PREPEND.cc+= ${_RELRO_LDFLAGS}
CWRAPPERS_PREPEND.cxx+= ${_RELRO_LDFLAGS}
.endif
+.if ${_PKGSRC_MKPIE} == "yes"
+_MKPIE_CFLAGS.clang= -fPIC
+_MKPIE_LDFLAGS= -pie
+
+. if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no"
+CFLAGS+= ${_MKPIE_CFLAGS.clang}
+CWRAPPERS_APPEND.cc+= ${_MKPIE_CFLAGS.clang}
+CWRAPPERS_APPEND.cxx+= ${_MKPIE_CFLAGS.clang}
+. endif
+.endif
+
LDFLAGS+= ${_CLANG_LDFLAGS}
# _LANGUAGES.<compiler> is ${LANGUAGES.<compiler>} restricted to the
Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.235 pkgsrc/mk/compiler/gcc.mk:1.236
--- pkgsrc/mk/compiler/gcc.mk:1.235 Tue Jan 18 01:41:09 2022
+++ pkgsrc/mk/compiler/gcc.mk Sun Mar 13 06:26:57 2022
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.235 2022/01/18 01:41:09 pho Exp $
+# $NetBSD: gcc.mk,v 1.236 2022/03/13 06:26:57 nia Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -103,7 +103,7 @@ _DEF_VARS.gcc= \
_EXTRA_CC_DIRS \
_CXX_STD_VERSIONS \
${_CXX_STD_VERSIONS:@std@_CXX_STD_FLAG.${std}@} \
- _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS.gcc \
+ _MKPIE_CFLAGS.gcc _MKPIE_LDFLAGS \
_FORTIFY_CFLAGS _RELRO_LDFLAGS _STACK_CHECK_CFLAGS \
_CTF_CFLAGS \
_GCC_DIR \
@@ -346,21 +346,16 @@ CWRAPPERS_APPEND.cc+= -std=gnu99
.if ${_PKGSRC_MKPIE} == "yes"
_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
+# for libraries a sink wrapper around gcc is required and used instead
+_MKPIE_LDFLAGS= -pie
. if ${PKGSRC_OVERRIDE_MKPIE:tl} == "no"
_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
.endif
Index: pkgsrc/mk/wrapper/bsd.wrapper.mk
diff -u pkgsrc/mk/wrapper/bsd.wrapper.mk:1.103 pkgsrc/mk/wrapper/bsd.wrapper.mk:1.104
--- pkgsrc/mk/wrapper/bsd.wrapper.mk:1.103 Tue Jan 18 01:41:09 2022
+++ pkgsrc/mk/wrapper/bsd.wrapper.mk Sun Mar 13 06:26:57 2022
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.wrapper.mk,v 1.103 2022/01/18 01:41:09 pho Exp $
+# $NetBSD: bsd.wrapper.mk,v 1.104 2022/03/13 06:26:57 nia Exp $
#
# Copyright (c) 2005 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -310,7 +310,7 @@ _WRAP_CMD_SINK.CXX= ${_WRAP_CMD_SINK.CC}
_WRAP_CMD_SINK.LD= ${WRAPPER_TMPDIR}/cmd-sink-mkpie-ld
MKPIE_CFLAGS= ${_MKPIE_CFLAGS.gcc}
.export MKPIE_CFLAGS
-MKPIE_LDFLAGS= ${_MKPIE_LDFLAGS.gcc}
+MKPIE_LDFLAGS= ${_MKPIE_LDFLAGS}
.export MKPIE_LDFLAGS
. endif
.endif
Home |
Main Index |
Thread Index |
Old Index