Module Name:    src
Committed By:   christos
Date:           Fri Dec 30 02:01:42 UTC 2022

Modified Files:
        src/share/mk: bsd.sys.mk

Log Message:
PR/57147: Andreas Gustafsson: Work around binutils 2.38+ relro
issue with +2M size in every binary by setting max-page-size. This
is the simplest fix; fixing this properly requires a lot more
surgery, and upstream seems uncertain how to fix it properly.


To generate a diff of this commit:
cvs rdiff -u -r1.309 -r1.310 src/share/mk/bsd.sys.mk

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

Modified files:

Index: src/share/mk/bsd.sys.mk
diff -u src/share/mk/bsd.sys.mk:1.309 src/share/mk/bsd.sys.mk:1.310
--- src/share/mk/bsd.sys.mk:1.309	Tue Dec 14 11:22:07 2021
+++ src/share/mk/bsd.sys.mk	Thu Dec 29 21:01:42 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.sys.mk,v 1.309 2021/12/14 16:22:07 christos Exp $
+#	$NetBSD: bsd.sys.mk,v 1.310 2022/12/30 02:01:42 christos Exp $
 #
 # Build definitions used for NetBSD source tree builds.
 
@@ -138,7 +138,10 @@ CFLAGS+=	-Wno-maybe-uninitialized
 .endif
 
 .if ${MKRELRO:Uno} != "no"
-LDFLAGS+=	-Wl,-z,relro
+# 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 we only
+# support relro by default on x86 and aarch64
+LDFLAGS+=	-Wl,-z,relro -Wl,-z,max-page-size=4096
 .endif
 
 .if ${MKRELRO:Uno} == "full" && ${NOFULLRELRO:Uno} == "no"

Reply via email to