Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: python fix for armv7 (and potentially powerpc)
To:
Peter Hessler <phessler@theapt.org>, ports@openbsd.org, gkoehler@openbsd.org, Kurt Mosiejczuk <kmos@openbsd.org>
Date:
Tue, 21 Oct 2025 14:00:08 +0200

Download raw body.

Thread
On Tue, Oct 21, 2025 at 01:37:42PM +0200, Jeremie Courreges-Anglas wrote:
> On Tue, Oct 21, 2025 at 01:16:41PM +0200, Peter Hessler wrote:
> > Selectively enable LTO depending on platform, this fixes the build for me
> > on armv7.  
> > 
> > OK?
> 
> Unless there actually is a pattern, I'd rather have LTO disabled
> selectively on platforms where it is known to break, and not
> forcefully enabled on other architectures.

(Just to clear possible confusion.)

I missed that we were already forcefully enabling LTO (on lld
platforms anyway).  duh.

> > Index: lang/python/Makefile.inc
> > ===================================================================
> > RCS file: /cvs/openbsd/ports/lang/python/Makefile.inc,v
> > diff -u -p -u -p -r1.168 Makefile.inc
> > --- lang/python/Makefile.inc	31 Jan 2025 12:46:51 -0000	1.168
> > +++ lang/python/Makefile.inc	21 Oct 2025 08:33:03 -0000
> > @@ -129,13 +129,15 @@ CONFIGURE_ARGS +=	--with-fpectl \
> >  .else
> >  CONFIGURE_ARGS +=	--enable-loadable-sqlite-extensions
> >  .  if ${PROPERTIES:Mlld}
> > -CONFIGURE_ARGS +=	--with-lto

...

> >  .    if ${MACHINE_ARCH} != "arm" && ${MACHINE_ARCH} != "powerpc"
> >  # On armv7, clang errors out due to lack of memory.
> >  # On powerpc, the python binary would crash by "Segmentation fault".
> >  # XXX lld from llvm-16 errors out with:
> >  # ld.lld: error: relocation R_X86_64_PC32 cannot be used against symbol '__profd_isdigit'; recompile with -fPIC
> >  #CONFIGURE_ARGS +=	--enable-optimizations
> 
> Let's fix the arm issue first, but this block probably needs
> revisiting now that we have clang 19.
> 
> > +CONFIGURE_ARGS +=	--with-lto
> > +.    else # arm powerpc
> > +CONFIGURE_ARGS +=	--with-lto=no
> >  .    endif
> >  .  endif
> >  TEST_IS_INTERACTIVE =	Yes
> > 

-- 
jca