Skip to content

Commit 344d9a9

Browse files
committed
Fix enable/disable ld.gold flag, force C99 for gmp
gmp configure needs to use C99 as well, or configure fails with GCC 15.1.0. Signed-off-by: Jan André Reuter <[email protected]>
1 parent 023317e commit 344d9a9

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

easybuild/easyblocks/g/gcc.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,10 +698,10 @@ def configure_step(self):
698698
self.configopts += " --enable-gold=default --enable-ld --with-plugin-ld=ld.gold"
699699
else:
700700
if binutils_has_ld_gold:
701+
self.configopts += " --enable-gold"
702+
else:
701703
self.log.debug("Disabling ld.gold, as is was not found")
702704
self.configopts += " --disable-gold"
703-
else:
704-
self.configopts += " --enable-gold"
705705
self.configopts += " --enable-ld=default"
706706

707707
# enable bootstrap build for self-containment (unless for staged build)
@@ -808,6 +808,10 @@ def build_step(self):
808808
if lib == "gmp":
809809
cmd = "./configure --prefix=%s " % stage2prefix
810810
cmd += "--with-pic --disable-shared --enable-cxx "
811+
# Force C99 during configure to avoid newer C standard
812+
# being used. This avoids inconsistencies between the configure
813+
# result and the build, where we force C99 via a patch.
814+
cmd += "CFLAGS=-std=c99 "
811815

812816
# ensure generic build when 'generic' is set to True or when --optarch=GENERIC is used
813817
# non-generic build can be enforced with generic=False if --optarch=GENERIC is used

0 commit comments

Comments
 (0)