pkgsrc-Changes archive

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

Re: CVS commit: pkgsrc/mk/compiler



On Sun, Jan 01, 2023 at 12:24:36AM +0100, Joerg Sonnenberger wrote:
> On Sat, Dec 31, 2022 at 08:35:38AM +0000, Thomas Klausner wrote:
> > @@ -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
> 
> So restrict it to those archs? This is affected other architectures...

I'm not into guessing these -- I took what NetBSD has in its source
tree. Update that and I'll update pkgsrc...
 Thomas
--- Begin Message ---
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"


--- End Message ---


Home | Main Index | Thread Index | Old Index