From 2881fc0a6205d593512458c24f3b681d12921005 Mon Sep 17 00:00:00 2001 From: Mohammad Akhlaghi Date: Mon, 5 May 2025 21:48:45 +0200 Subject: Configuration: basic software build with host GCC 15.1 Summary: this will not affect already built/configured projects, only improving the portability of future builds. Until this commit, no specific C standard version was given during the build of Basic software (which use the host's c compiler, culminating in the building of GCC within Maneage). On the other hand, GCC 15.1 was recentely released and made available on some operating systems. GCC 15.1 has made C23 its standard C version (from C17), as a result, some of the basic software crashed and didn't allow Maneage to built on those operating systems. With this commit, the '-std=c17' flag has been added to software that crashed when the host GCC was 15.1. Also, they have been grouped with a description of this problem in 'versions.conf' so we check the need for this option in future version updates. In parallel, some minor edits/clarifications were made in the two 'README-apptainer.md' and 'README-docker.md' files to be more useful. --- reproduce/software/make/basic.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'reproduce/software/make') diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index 40c5a4e..c9aba96 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -423,6 +423,7 @@ $(ibidir)/ncurses-$(ncurses-version): $(ibidir)/patchelf-$(patchelf-version) rm -f $(ibdir)/bash* $(ibdir)/awk* $(ibdir)/gawk* # Standard build process. + export CFLAGS="-std=c17 $$CFLAGS" $(call gbuild, ncurses-$(ncurses-version), static, \ --with-shared --enable-rpath --without-normal \ --without-debug --with-cxx-binding \ @@ -561,7 +562,7 @@ $(ibidir)/bash-$(bash-version): \ if [ "x$(static_build)" = xyes ]; then stopt="--enable-static-link" else stopt="" fi; - export CFLAGS="$$CFLAGS \ + export CFLAGS="$$CFLAGS -std=c17 \ -DDEFAULT_PATH_VALUE='\"$(ibdir)\"' \ -DSTANDARD_UTILS_PATH='\"$(ibdir)\"' \ -DSYS_BASHRC='\"$(BASH_ENV)\"' " @@ -1014,6 +1015,7 @@ $(ibidir)/gmp-$(gmp-version): \ $(ibidir)/coreutils-$(coreutils-version) tarball=gmp-$(gmp-version).tar.lz $(call import-source, $(gmp-url), $(gmp-checksum)) + export CFLAGS="-std=c17 $$CFLAGS" $(call gbuild, gmp-$(gmp-version), static, \ --enable-cxx --enable-fat, \ -j$(numthreads)) @@ -1074,6 +1076,7 @@ $(ibidir)/grep-$(grep-version): $(ibidir)/coreutils-$(coreutils-version) $(ibidir)/m4-$(m4-version): $(ibidir)/patchelf-$(patchelf-version) tarball=m4-$(m4-version).tar.lz $(call import-source, $(m4-url), $(m4-checksum)) + export CFLAGS="-std=c17 $$CFLAGS" $(call gbuild, m4-$(m4-version), static, \ --with-syscmd-shell=$(ibdir)/dash, \ -j$(numthreads) V=1) @@ -1106,6 +1109,7 @@ $(ibidir)/pkg-config-$(pkgconfig-version): $(ibidir)/patchelf-$(patchelf-version if [ x$(on_mac_os) = xyes ]; then export compiler="CC=clang" else export compiler="" fi + export CFLAGS="-std=c17 $$CFLAGS" $(call gbuild, pkg-config-$(pkgconfig-version), static, \ $$compiler --with-internal-glib \ --with-pc-path=$(ildir)/pkgconfig, V=1) -- cgit v1.2.1