From ef9caca4daa3d9d05d45aea29cb0c62c49604b21 Mon Sep 17 00:00:00 2001 From: nhmall Date: Mon, 10 Aug 2020 10:03:12 -0400 Subject: [PATCH] distinguish compiler version before adding new -Wno option --- sys/unix/hints/linux.2020 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/unix/hints/linux.2020 b/sys/unix/hints/linux.2020 index 5371c0c83..7d19ddc04 100755 --- a/sys/unix/hints/linux.2020 +++ b/sys/unix/hints/linux.2020 @@ -132,7 +132,10 @@ endif endif CFLAGS=-g -O -I../include -DNOTPARMDECL +GTEQ9 := $(shell expr `gcc -dumpversion | cut -f1 -d.` \>= 9) +ifeq "$(GTEQ9)" "1" CFLAGS+=-Wno-format-overflow +endif #compiler version greater than or equal to 9 CFLAGS+=-DDLB CFLAGS+=-DCOMPRESS=\"/bin/gzip\" -DCOMPRESS_EXTENSION=\".gz\" CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE