mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 21:33:47 -07:00
skip stringop-overflow warning flags if clang is detected
This commit is contained in:
parent
534fc5071b
commit
006d8923e6
1 changed files with 8 additions and 0 deletions
|
@ -43,6 +43,12 @@ INSTALLDOCSRELPATH ?= share/doc/proxmark3
|
||||||
platform = $(shell uname)
|
platform = $(shell uname)
|
||||||
DETECTED_OS=$(platform)
|
DETECTED_OS=$(platform)
|
||||||
|
|
||||||
|
ifeq ($(shell $(CC) -v 2>&1 | grep -c "clang version"), 1)
|
||||||
|
DETECTED_COMPILER = clang
|
||||||
|
else
|
||||||
|
DETECTED_COMPILER = gcc
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(platform),Darwin)
|
ifeq ($(platform),Darwin)
|
||||||
AR= /usr/bin/ar rcs
|
AR= /usr/bin/ar rcs
|
||||||
RANLIB= /usr/bin/ranlib
|
RANLIB= /usr/bin/ranlib
|
||||||
|
@ -74,7 +80,9 @@ DEFCFLAGS += -Wswitch-enum -Wno-error=switch-enum
|
||||||
# GCC 10 has issues with false positives on stringop-overflow, let's disable them for now (cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92955, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335)
|
# GCC 10 has issues with false positives on stringop-overflow, let's disable them for now (cf https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92955, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94335)
|
||||||
# beware these flags didn't exist for GCC < 7
|
# beware these flags didn't exist for GCC < 7
|
||||||
ifeq ($(shell expr $(CC_VERSION) \>= 10), 1)
|
ifeq ($(shell expr $(CC_VERSION) \>= 10), 1)
|
||||||
|
ifneq ($(DETECTED_COMPILER), clang)
|
||||||
DEFCFLAGS += -Wno-stringop-overflow -Wno-error=stringop-overflow
|
DEFCFLAGS += -Wno-stringop-overflow -Wno-error=stringop-overflow
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
ifeq ($(platform),Darwin)
|
ifeq ($(platform),Darwin)
|
||||||
# their readline has strict-prototype issues
|
# their readline has strict-prototype issues
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue