mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 07:42:44 +00:00
build-all: fix issue on gcc 15
Error was:
```
configure: error: could not find a working compiler, see config.log for details
```
config.log:
```
conftest.c: In function 'f':
conftest.c:12:48: error: too many arguments to function 'g'; expected 0, have 6
12 | for(i=0;i<1;i++){if(e(got,got,9,d[i].n)==0)h();g(i,d[i].src,d[i].n,got,d[i].want,9);if(d[i].n)h();}}
| ^ ~
```
This commit is contained in:
@@ -1171,6 +1171,14 @@ if "cgal" in targets:
|
|||||||
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
|
os.environ["CC"] = MAC_CROSS_COMPILE_INTEL_CC
|
||||||
gmp_args.extend(MAC_CROSS_COMPILE_INTEL_AUTOCONF_HOST_ARGS)
|
gmp_args.extend(MAC_CROSS_COMPILE_INTEL_AUTOCONF_HOST_ARGS)
|
||||||
|
|
||||||
|
# Fixes configure failing to find a working compiler under GCC 15's default -std=gnu23.
|
||||||
|
# Issue presumably will be resolved in any next gmp version, but currently the last one is 6.3.0.
|
||||||
|
# Patch is just applying fix from upstream meantion below:
|
||||||
|
# https://gmplib.org/list-archives/gmp-bugs/2025-February/005561.html
|
||||||
|
gmp_patches = ["./patches/gmp/001-fix-std23.patch"]
|
||||||
|
if GMP_VERSION != "6.3.0":
|
||||||
|
raise Exception(f"GMP_VERSION changed to {GMP_VERSION}, check whether {gmp_patches} is still needed.")
|
||||||
|
|
||||||
build_dependency(
|
build_dependency(
|
||||||
name=f"gmp-{GMP_VERSION}",
|
name=f"gmp-{GMP_VERSION}",
|
||||||
mode="autoconf",
|
mode="autoconf",
|
||||||
@@ -1178,6 +1186,7 @@ if "cgal" in targets:
|
|||||||
pre_compile_subs=(
|
pre_compile_subs=(
|
||||||
[("build/config.h", "HAVE_OBSTACK_VPRINTF 1", "HAVE_OBSTACK_VPRINTF 0")] if "wasm" in flags else []
|
[("build/config.h", "HAVE_OBSTACK_VPRINTF 1", "HAVE_OBSTACK_VPRINTF 0")] if "wasm" in flags else []
|
||||||
),
|
),
|
||||||
|
patch=gmp_patches,
|
||||||
# Sometimes ftp.gnu.org is very slow, use ftpmirror.gnu.org as a workaround.
|
# Sometimes ftp.gnu.org is very slow, use ftpmirror.gnu.org as a workaround.
|
||||||
download_url="https://ftpmirror.gnu.org/gnu/gmp/",
|
download_url="https://ftpmirror.gnu.org/gnu/gmp/",
|
||||||
download_name=f"gmp-{GMP_VERSION}.tar.bz2",
|
download_name=f"gmp-{GMP_VERSION}.tar.bz2",
|
||||||
|
|||||||
@@ -0,0 +1,27 @@
|
|||||||
|
Fixes configure failing to find a working compiler under GCC 15's default
|
||||||
|
-std=gnu23 (upstream fix: https://gmplib.org/repo/gmp/rev/8e7bb4ae7a18).
|
||||||
|
|
||||||
|
Upstream fix is patching `acinclude.m4`, but since in the release tarball
|
||||||
|
all macros are already expanded to `configure` script, so we're patching
|
||||||
|
all occurrences of that macro.
|
||||||
|
|
||||||
|
--- a/configure
|
||||||
|
+++ b/configure
|
||||||
|
@@ -6568,7 +6568,7 @@
|
||||||
|
|
||||||
|
#if defined (__GNUC__) && ! defined (__cplusplus)
|
||||||
|
typedef unsigned long long t1;typedef t1*t2;
|
||||||
|
-void g(){}
|
||||||
|
+void g(int,t1 const*,t1,t2,t1 const*,int){}
|
||||||
|
void h(){}
|
||||||
|
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
|
||||||
|
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
|
||||||
|
@@ -8187,7 +8187,7 @@
|
||||||
|
|
||||||
|
#if defined (__GNUC__) && ! defined (__cplusplus)
|
||||||
|
typedef unsigned long long t1;typedef t1*t2;
|
||||||
|
-void g(){}
|
||||||
|
+void g(int,t1 const*,t1,t2,t1 const*,int){}
|
||||||
|
void h(){}
|
||||||
|
static __inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
|
||||||
|
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
|
||||||
Reference in New Issue
Block a user