From 58eb63c18a091570013368ec1ba63d88c7d47b2f Mon Sep 17 00:00:00 2001 From: Manuel Solimano Date: Fri, 13 May 2022 18:01:45 -0400 Subject: Configuration: necessary compiler flag added for file in CentOS 7 Until now, Maneage failed to build the 'file' program on at least one machine running CentOS version 7.9.2009 (with Linux kernel 3.10.0, and GCC 4.8.5) when running './project configure'. With this commit (as suggested by the error message issued by the compiler), the '-std=c99' is passed to the compiler in the 'file' recipe (within 'basic.mk'). This flag puts the compiler in C99 mode, which forces it to compile code according to the 1999 edition of the C standard. This was necessary for older versions of GCC (for example GCC 4.8.5 was released in June 2015); hence why others hadn't reported this issue until now. After this fix, File compiles succesfully on such systems; without causing any problem with newer GCC versions (tested in GCC 12.1.0). This issue was solved with the help of Pedram Ashofte Ardakani and Mohammad Akhlaghi. --- reproduce/software/make/basic.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/reproduce/software/make/basic.mk b/reproduce/software/make/basic.mk index adb157b..d90d945 100644 --- a/reproduce/software/make/basic.mk +++ b/reproduce/software/make/basic.mk @@ -883,6 +883,7 @@ $(ibidir)/diffutils-$(diffutils-version): \ echo "GNU Diffutils $(diffutils-version)" > $@ $(ibidir)/file-$(file-version): $(ibidir)/coreutils-$(coreutils-version) + export CFLAGS="-std=c99 $$CFLAGS" tarball=file-$(file-version).tar.lz $(call import-source, $(file-url), $(file-checksum)) $(call gbuild, file-$(file-version), static, \ -- cgit v1.2.1