Skip to contentSkip to conversation

build: centos/RHEL 7 ships with an older gcc and zlib

PATCH New David Aguilar 1 participant 1 message Jan 16, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: centos/RHEL 7 ships with an older gcc and zlib

GCC 4.8.5 is the default system compiler on centos7/RHEL7. This version requires -std=c99 to enable c99 support.

zlib 1.2.7 on centos7/rhel7 lacks uncompress2().

---
 config.mak.uname | 5 +++++
 1 file changed, 5 insertions(+)
config.mak.uname +5 -0
index 9b3e9bff5f..c48db45106 100644
@@ -63,6 +63,11 @@ ifeq ($(uname_S),Linux)
 	PROCFS_EXECUTABLE_PATH = /proc/self/exe
 	HAVE_PLATFORM_PROCINFO = YesPlease
 	COMPAT_OBJS += compat/linux/procinfo.o
+	# centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
+	ifneq ($(findstring .el7.,$(uname_R)),)
+		BASIC_CFLAGS += -std=c99
+		NO_UNCOMPRESS2 = YesPlease
+	endif
 endif
 ifeq ($(uname_S),GNU/kFreeBSD)
 	HAVE_ALLOCA_H = YesPlease
Signature · 1 line
2.30.1 (Apple Git-130)