Skip to content

Commit ffb9f29

Browse files
davvidgitster
authored andcommitted
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(). Signed-off-by: David Aguilar <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a4bbd13 commit ffb9f29

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

config.mak.uname

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ ifeq ($(uname_S),Linux)
6363
PROCFS_EXECUTABLE_PATH = /proc/self/exe
6464
HAVE_PLATFORM_PROCINFO = YesPlease
6565
COMPAT_OBJS += compat/linux/procinfo.o
66+
# centos7/rhel7 provides gcc 4.8.5 and zlib 1.2.7.
67+
ifneq ($(findstring .el7.,$(uname_R)),)
68+
BASIC_CFLAGS += -std=c99
69+
NO_UNCOMPRESS2 = YesPlease
70+
endif
6671
endif
6772
ifeq ($(uname_S),GNU/kFreeBSD)
6873
HAVE_ALLOCA_H = YesPlease

0 commit comments

Comments
 (0)