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: wiz
Date: Sat Dec 31 08:35:38 UTC 2022
Modified Files:
pkgsrc/mk/compiler: clang.mk gcc.mk
Log Message:
mk: work around binutils 2.39 problem with relro on NetBSD
To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 pkgsrc/mk/compiler/clang.mk
cvs rdiff -u -r1.247 -r1.248 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/clang.mk
diff -u pkgsrc/mk/compiler/clang.mk:1.37 pkgsrc/mk/compiler/clang.mk:1.38
--- pkgsrc/mk/compiler/clang.mk:1.37 Thu Jul 7 17:19:55 2022
+++ pkgsrc/mk/compiler/clang.mk Sat Dec 31 08:35:37 2022
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.37 2022/07/07 17:19:55 jperkin Exp $
+# $NetBSD: clang.mk,v 1.38 2022/12/31 08:35:37 wiz Exp $
#
# This is the compiler definition for the clang compiler.
#
@@ -41,7 +41,7 @@ PKG_CPP:= ${CPPPATH}
.if exists(${CCPATH})
CC_VERSION_STRING!= ${CCPATH} -v 2>&1
-CC_VERSION!= ${CCPATH} --version 2>&1 | ${SED} -n "s/^.* version /clang-/p"
+CC_VERSION!= ${CCPATH} --version 2>&1 | ${SED} -n "s/^.* version /clang-/p"
.else
CC_VERSION_STRING?= ${CC_VERSION}
CC_VERSION?= clang
@@ -62,6 +62,12 @@ _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
.else
_RELRO_LDFLAGS= -Wl,-zrelro
.endif
+# XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301
+# Set manually the maxpagesize to 4096 which is ok for now since NetBSD only
+# supports relro by default on x86 and aarch64
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109901
+_RELRO_LDFLAGS+= -Wl,-z,max-page-size=4096
+.endif
# The user can choose the level of stack smashing protection.
.if ${PKGSRC_USE_SSP} == "all"
Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.247 pkgsrc/mk/compiler/gcc.mk:1.248
--- pkgsrc/mk/compiler/gcc.mk:1.247 Wed Nov 23 15:44:11 2022
+++ pkgsrc/mk/compiler/gcc.mk Sat Dec 31 08:35:37 2022
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.247 2022/11/23 15:44:11 jperkin Exp $
+# $NetBSD: gcc.mk,v 1.248 2022/12/31 08:35:37 wiz Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -444,6 +444,12 @@ _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
.else
_RELRO_LDFLAGS= -Wl,-zrelro
.endif
+# XXX Workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1014301
+# Set manually the maxpagesize to 4096 which is ok for now since NetBSD only
+# supports relro by default on x86 and aarch64
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} > 109901
+_RELRO_LDFLAGS+= -Wl,-z,max-page-size=4096
+.endif
.if !empty(_RELRO_LDFLAGS) && !empty(MACHINE_PLATFORM:MNetBSD-*-*mips*)
_RELRO_LDFLAGS+= -Wl,-z,common-page-size=0x10000
Home |
Main Index |
Thread Index |
Old Index