The OpenBSD powerpc64 target header defined JUMP_TABLES_IN_TEXT_SECTION,
which emits switch jump tables inline in .text. OpenBSD maps text
execute-only, so code that loads from a jump table faults. This showed
up as NumPy crashing on import on powerpc64.

Drop the override so jump tables go in .rodata like other targets.

While here, also remove a powerpc64 build workaround in tree-vect-loop.cc
that is no longer necessary.


Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/16/Makefile,v
retrieving revision 1.36
diff -u -p -u -p -r1.36 Makefile
--- Makefile    23 Oct 2026 16:20:03 -0000      1.36
+++ Makefile    24 Oct 2026 02:39:56 -0000
@@ -15,7 +15,7 @@ USE_NOEXECONLY = Yes
 # - turn -Wimplicit-function-declaration and -Wincompatible-pointer-types
 #   into simple warnings.
 V = 16.2.0
-REVISION = 2
+REVISION = 3
 GCC_PKGSPEC = >=16,<17
 
 # aarch64, powerpc64 and sparc64 bootstrap contain only gdc
Index: patches/patch-gcc_config_rs6000_openbsd64_h
===================================================================
RCS file: /cvs/ports/lang/gcc/16/patches/patch-gcc_config_rs6000_openbsd64_h,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-gcc_config_rs6000_openbsd64_h
--- patches/patch-gcc_config_rs6000_openbsd64_h 2 Jun 2026 20:00:17 -0000       
1.1.1.1
+++ patches/patch-gcc_config_rs6000_openbsd64_h 24 Oct 2026 02:39:57 -0000
@@ -1,7 +1,7 @@
 Index: gcc/config/rs6000/openbsd64.h
 --- gcc/config/rs6000/openbsd64.h.orig
 +++ gcc/config/rs6000/openbsd64.h
-@@ -0,0 +1,411 @@
+@@ -0,0 +1,407 @@
 +/* Definitions for 64-bit PowerPC running OpenBSD using the ELF format
 +   Copyright (C) 2012-2021 Free Software Foundation, Inc.
 +
@@ -182,10 +182,6 @@ Index: gcc/config/rs6000/openbsd64.h
 +#undef TARGET_ALIGN_NATURAL
 +#define TARGET_ALIGN_NATURAL 1
 +#endif
-+
-+/* Indicate that jump tables go in the text section.  */
-+#undef  JUMP_TABLES_IN_TEXT_SECTION
-+#define JUMP_TABLES_IN_TEXT_SECTION TARGET_64BIT
 +
 +/* The linux ppc64 ABI isn't explicit on whether aggregates smaller
 +   than a doubleword should be padded upward or downward.  You could
Index: patches/patch-gcc_tree-vect-loop_cc
===================================================================
RCS file: patches/patch-gcc_tree-vect-loop_cc
diff -N patches/patch-gcc_tree-vect-loop_cc
--- patches/patch-gcc_tree-vect-loop_cc 2 Jun 2026 20:00:17 -0000       1.1.1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-Index: gcc/tree-vect-loop.cc
---- gcc/tree-vect-loop.cc.orig
-+++ gcc/tree-vect-loop.cc
-@@ -61,6 +61,8 @@ along with GCC; see the file COPYING3.  If not see
- #include "opts.h"
- #include "hierarchical_discriminator.h"
- 
-+#define vec_step vec_step_
-+
- /* Loop Vectorization Pass.
- 
-    This pass tries to vectorize loops.

Reply via email to