summaryrefslogtreecommitdiff
path: root/mk/compiler
diff options
context:
space:
mode:
authornia <nia@pkgsrc.org>2021-12-22 10:14:27 +0000
committernia <nia@pkgsrc.org>2021-12-22 10:14:27 +0000
commit991845a2d38abb8d73b25383f98235de9950ec77 (patch)
treeded972d5b466874c38ba6e7870bedf62bc23b8fd /mk/compiler
parenta8d810f20ecb80e865f1588935a2366acaf674e5 (diff)
downloadpkgsrc-991845a2d38abb8d73b25383f98235de9950ec77.tar.gz
mk: Set the default page size when compiling with RELRO with GCC on
NetBSD/mips. PR pkg/56559
Diffstat (limited to 'mk/compiler')
-rw-r--r--mk/compiler/gcc.mk6
1 files changed, 5 insertions, 1 deletions
diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk
index 867d3c3e771..03f40a601e2 100644
--- a/mk/compiler/gcc.mk
+++ b/mk/compiler/gcc.mk
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.233 2021/12/19 11:55:29 nia Exp $
+# $NetBSD: gcc.mk,v 1.234 2021/12/22 10:14:27 nia Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -393,6 +393,10 @@ _RELRO_LDFLAGS= -Wl,-zrelro -Wl,-znow
_RELRO_LDFLAGS= -Wl,-zrelro
.endif
+.if !empty(_RELRO_LDFLAGS) && !empty(MACHINE_PLATFORM:MNetBSD-*-*mips*)
+_RELRO_LDFLAGS+= -Wl,-z,common-page-size=0x10000
+.endif
+
_STACK_CHECK_CFLAGS= -fstack-check
.if ${_PKGSRC_USE_STACK_CHECK} == "yes"