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>
Cc:
ports@openbsd.org, gkoehler@openbsd.org, Kurt Mosiejczuk <kmos@openbsd.org>
Date:
Tue, 21 Oct 2025 13:37:42 +0200

Download raw body.

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

The current powerpc build seems to have succeeded on powerpc, but I'll
let gkoehler@ confirm.

> I also slipped this into the 7.8-release build for armv7, OK to commit to
> branch?

Makes sense, but not this diff please.

> 
> 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
> 
> 
> -- 
> It has been said that man is a rational animal.  All my life I have
> been searching for evidence which could support this.
> 		-- Bertrand Russell
> 

-- 
jca