pkgsrc-WIP-changes archive

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

guile30: work around pax mprotect issue



Module Name:	pkgsrc-wip
Committed By:	Thomas Klausner <tk%giga.or.at@localhost>
Pushed By:	wiz
Date:		Mon Mar 7 22:02:31 2022 +0100
Changeset:	e480c13e2edde641f6b188e6581c1a0f0670c5ff

Modified Files:
	guile30/Makefile
	guile30/TODO
	guile30/distinfo
Added Files:
	guile30/patches/patch-libguile_Makefile.in

Log Message:
guile30: work around pax mprotect issue

Call paxctl during build, after guile binary is created.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=e480c13e2edde641f6b188e6581c1a0f0670c5ff

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

diffstat:
 guile30/Makefile                           |  2 ++
 guile30/TODO                               | 17 -----------------
 guile30/distinfo                           |  1 +
 guile30/patches/patch-libguile_Makefile.in | 14 ++++++++++++++
 4 files changed, 17 insertions(+), 17 deletions(-)

diffs:
diff --git a/guile30/Makefile b/guile30/Makefile
index d4b0ad4aeb..1b194770f4 100644
--- a/guile30/Makefile
+++ b/guile30/Makefile
@@ -20,6 +20,8 @@ CONFIGURE_ARGS+=	--disable-shared
 CONFIGURE_ARGS+=	SHELL=${CONFIG_SHELL}
 # Needed to work around broken configure check for accept4()
 LDFLAGS.SunOS+=		-lsocket -lnsl
+MAKE_ENV+=		PAXCTL=echo
+MAKE_ENV.NetBSD+=	PAXCTL=paxctl
 
 .if !empty(GUILE_SUBDIR)
 # Installation prefix is non-default.
diff --git a/guile30/TODO b/guile30/TODO
index 6656387319..46d584ac4d 100644
--- a/guile30/TODO
+++ b/guile30/TODO
@@ -3,23 +3,6 @@
 3.0.4 changes the libguile shlib version backwards.  Reported upstream
 on 20201213.
 
-* MPROTECT
-
-On NetBSD, guile is marked NOT_MPROTECT_SAFE.  However, guile is built
-and then used during the build, and that version hits the same
-problem:
-
-      GEN      guile-procedures.texi
-    allocating JIT code buffer failed: Permission denied
-    jit.c:5612: fatal: assertion failed
-    [1]   Broken pipe             cat alist.doc array-handle.doc array-map.doc a... |
-	  Abort trap (core dumped) GUILE_AUTO_COMPILE=0 ../meta/build-env guild s...
-
-Reported to guile-devel@ on 20200827.
-
-Probably needs a "paxctl +m guile" for the binary (in .libs via
-libtool) after build and before use as a build tool.
-
 * TMPNAM
 
 with CONFIGURE_ARGS+=       --disable-tmpnam
diff --git a/guile30/distinfo b/guile30/distinfo
index 87fc0d2b18..2f3480b26f 100644
--- a/guile30/distinfo
+++ b/guile30/distinfo
@@ -3,4 +3,5 @@ $NetBSD: distinfo,v 1.8 2019/09/10 03:47:27 gutteridge Exp $
 RMD160 (guile-3.0.7.tar.gz) = 0a7035e6a7cae8363692921018dee3bcc5fdf8ec
 SHA512 (guile-3.0.7.tar.gz) = d7b159e109fd4a08231ef9b961376e71c2872f08d47d82896d96ccac250f5677b35be9a8ce3b9a758bd2ed78d6451e4fdd844408a1baf684256d9bfa09999f3f
 Size (guile-3.0.7.tar.gz) = 21878396 bytes
+SHA1 (patch-libguile_Makefile.in) = eae49ebd5b2a4a415be89503819f454b7eb6a21d
 SHA1 (patch-libguile_loader.c) = 32b012d095c343995f93d0c8160411c4b0cfbee1
diff --git a/guile30/patches/patch-libguile_Makefile.in b/guile30/patches/patch-libguile_Makefile.in
new file mode 100644
index 0000000000..4686e1d62e
--- /dev/null
+++ b/guile30/patches/patch-libguile_Makefile.in
@@ -0,0 +1,14 @@
+$NetBSD$
+
+Disable PaX MPROTECT for guile binary (needed due to its JIT).
+
+--- libguile/Makefile.in.orig	2021-05-10 08:30:31.000000000 +0000
++++ libguile/Makefile.in
+@@ -2766,6 +2766,7 @@ libguile-@GUILE_EFFECTIVE_VERSION@.la: $
+ guile$(EXEEXT): $(guile_OBJECTS) $(guile_DEPENDENCIES) $(EXTRA_guile_DEPENDENCIES) 
+ 	@rm -f guile$(EXEEXT)
+ 	$(AM_V_CCLD)$(guile_LINK) $(guile_OBJECTS) $(guile_LDADD) $(LIBS)
++	$(PAXCTL) +m .libs/guile$(EXEEXT)
+ install-binSCRIPTS: $(bin_SCRIPTS)
+ 	@$(NORMAL_INSTALL)
+ 	@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \


Home | Main Index | Thread Index | Old Index