Index | Thread | Search

From:
Stuart Henderson <stu@spacehopper.org>
Subject:
py-zstd, don't force -O3, avoid -fno-lto
To:
Thomas Frohwein <tfrohwein@fastmail.com>
Cc:
ports <ports@openbsd.org>
Date:
Mon, 20 Oct 2025 19:54:31 +0100

Download raw body.

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

ok?


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