On Mon, 26 Oct 2026 09:46:06 +0100,
Brad Smith <[email protected]> wrote:
> 
> On 2026-10-26 4:31 a.m., Jeremie Courreges-Anglas wrote:
> > On Fri, Oct 23, 2026 at 10:57:57PM -0400, Brad Smith wrote:
> >> 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.
> > Makes sense to me, ok jca@ for this part.
> > 
> >> While here, also remove a powerpc64 build workaround in tree-vect-loop.cc
> >> that is no longer necessary.
> > I didn't check this part.
> > 
> > +cc kirill@ gkoehler@
> 
> https://github.com/gcc-mirror/gcc/commit/8046a7e2aeeae80c15d99d55ae04755aedf46a2f
> 
> Downstream 13.3 and newer has integrated the workaround for the Clang issue.
>

Thanks.

I plan to start my tests of ada for gcc-16 at powerpc64 later today, and
I'll include your diff and try numpy after that.

After that, I'll commit it in, I think a few days.

> >> 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.
> >> 

-- 
wbr, Kirill

Reply via email to