]> git.ipfire.org Git - thirdparty/git.git/commitdiff
build: centos/RHEL 7 ships with an older gcc and zlib
authorDavid Aguilar <davvid@gmail.com>
Sun, 16 Jan 2022 02:05:20 +0000 (18:05 -0800)
committerJunio C Hamano <gitster@pobox.com>
Sun, 16 Jan 2022 22:18:17 +0000 (14:18 -0800)
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().

Signed-off-by: David Aguilar <davvid@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
config.mak.uname

index a3a779327f8d5f4a523bb7b9a0b9d8905151a996..5ed1d8755fd07dea221e5c3a8c564f0b34c49e9b 100644 (file)
@@ -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