When attempting to build OpenJDK with GCC 15 and glibc 2.42 (the GCC/glibc versions for F43 to be released in Fall 2025) the build fails with something like this:
++ /usr/bin/tee -a /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/build/newboot/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch.log
++ /usr/bin/tee -a /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/build/newboot/hotspot/variant-server/libjvm/objs/precompiled/precompiled.hpp.gch.log
In file included from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/nmt/memTag.hpp:28,
from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/memory/allocation.hpp:29,
from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/classfile/classLoaderData.hpp:28,
from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/precompiled/precompiled.hpp:34:
/builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/utilities/globalDefinitions.hpp:1166:28: error: ‘unsigned int uabs(int)’ was declared ‘extern’ and later ‘static’ [-fpermissive]
1166 | static inline unsigned int uabs(int n) { return uabs((unsigned int)n); }
| ^~~~
In file included from /usr/include/c++/15/cstdlib:83,
from /usr/include/c++/15/stdlib.h:36,
from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/utilities/globalDefinitions_gcc.hpp:42,
from /builddir/build/BUILD/java-latest-openjdk-portable-24.0.1.0.9-build/java-24-openjdk-24.0.1.0.9-1.rolling.fc43.x86_64/jdk-24.0.1+9/src/hotspot/share/utilities/globalDefinitions.hpp:35:
/usr/include/stdlib.h:989:21: note: previous declaration of ‘unsigned int uabs(int)’
989 | extern unsigned int uabs (int __x) __THROW __attribute__ ((__const__)) __wur;
| ^~~~
+ exitcode=1
The reason for this seems to be a name clash of uabs() when stdlib.h is being included. GCC defines a version of it and so does HotSpot.