Index | Thread | Search

From:
Thomas Frohwein <tfrohwein@fastmail.com>
Subject:
Re: py-zstd, don't force -O3, avoid -fno-lto
To:
Stuart Henderson <stu@spacehopper.org>
Cc:
ports <ports@openbsd.org>
Date:
Mon, 27 Oct 2025 02:07:49 -0400

Download raw body.

Thread
On Mon, 20 Oct 2025 19:54:31 +0100
Stuart Henderson <stu@spacehopper.org> wrote:

> -fno-lto breaks build on sparc64, which is bad for a "nojunk" port
> 
> ok?

Thanks for finding this, I committed it.

> 
> 
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/archivers/py-zstd/Makefile,v
> diff -u -p -r1.1.1.1 Makefile
> --- Makefile	27 Aug 2025 21:29:55 -0000	1.1.1.1
> +++ Makefile	20 Oct 2025 18:53:30 -0000
> @@ -1,6 +1,7 @@
>  COMMENT =		zstd bindings for python
>  
>  MODPY_DISTV =		1.5.7.2
> +REVISION =		0
>  DISTNAME =		zstd-${MODPY_DISTV}
>  PKGNAME =		py-${DISTNAME}
>  
> Index: patches/patch-setup_py
> ===================================================================
> RCS file: patches/patch-setup_py
> diff -N patches/patch-setup_py
> --- /dev/null	1 Jan 1970 00:00:00 -0000
> +++ patches/patch-setup_py	20 Oct 2025 18:53:30 -0000
> @@ -0,0 +1,26 @@
> +- disable -fno-lto; base-gcc doesn't understand it
> +- don't build with -O3 by default
> +
> +Index: setup.py
> +--- setup.py.orig
> ++++ setup.py
> +@@ -355,8 +355,8 @@ if BUILD_SPEED3:
> +         'msvc': ['/O3', ],
> +         'mingw32': ['-O3',],
> +         'unix': ['-O3',],
> +-        'clang': ['-O3',],
> +-        'gcc': ['-O3',],
> ++        'clang': ['',],
> ++        'gcc': ['',],
> +     }
> + ###
> + # DVERSION - pass module version string
> +@@ -399,7 +399,7 @@ if SUP_DEBUG:
> +             COPT[comp].extend([ '-DZSTD_DEBUG=1','-g',
> +             ])
> + 
> +-if BUILD_NO_LTO:
> ++if 0 and BUILD_NO_LTO:
> +     for comp in COPT:
> +         if comp == 'msvc':
> +             pass