gcc 4.6 hasn't been patched to avoid strict W^X violations in the
bundled libffi copy.  I think we'd better stay consistent ports-wise
regarding wxneeded/W^X violations handling, arch-specific details on
this matter are already not easy to grok...

ok?

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/4.6/Makefile,v
retrieving revision 1.86
diff -u -p -r1.86 Makefile
--- Makefile    12 May 2016 01:17:13 -0000      1.86
+++ Makefile    7 Jun 2016 11:42:43 -0000
@@ -1,7 +1,7 @@
 # $OpenBSD: Makefile,v 1.86 2016/05/12 01:17:13 naddy Exp $
 
 #ONLY_FOR_ARCHS = alpha amd64 hppa i386 powerpc sparc64
-# ignore arches that have a valid 4.8 port
+# ignore arches that have a more recent gcc port
 ONLY_FOR_ARCHS = alpha
 DPB_PROPERTIES = parallel
 
@@ -31,6 +31,8 @@ PKGNAME-go =  gccgo-${FULL_PKGVERSION}
 PKGSPEC-main = gcc->=4.6,<4.7
 
 REVISION = 16
+REVISION-java = 17
+REVISION-go = 17
 
 SHARED_LIBS =  estdc++         14.0 \
                gfortran        3.0 \
Index: patches/patch-libffi_src_closures_c
===================================================================
RCS file: patches/patch-libffi_src_closures_c
diff -N patches/patch-libffi_src_closures_c
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-libffi_src_closures_c 6 Jun 2016 19:07:15 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+--- libffi/src/closures.c.orig Mon Jun  6 21:05:54 2016
++++ libffi/src/closures.c      Mon Jun  6 21:06:55 2016
+@@ -453,6 +453,7 @@ dlmmap (void *start, size_t length, int prot,
+   printf ("mapping in %zi\n", length);
+ #endif
+ 
++#if 0
+   if (execfd == -1 && !is_selinux_enabled ())
+     {
+       ptr = mmap (start, length, prot | PROT_EXEC, flags, fd, offset);
+@@ -465,6 +466,7 @@ dlmmap (void *start, size_t length, int prot,
+        with ((prot & ~PROT_WRITE) | PROT_EXEC) and mremap with
+        MREMAP_DUP and prot at this point.  */
+     }
++#endif
+ 
+   if (execsize == 0 || execfd == -1)
+     {


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to