Skip to content

Commit

Permalink
split PLATFORM_CFLAGS into PLATFORM_CFLAGS and PLATFORM_CXXFLAGS to a…
Browse files Browse the repository at this point in the history
…void err when compiling .c files (#6625)

#[changelog] #[linux]
  • Loading branch information
armadillu authored Oct 28, 2020
1 parent f9cb24b commit 9eabc1c
Showing 1 changed file with 16 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,29 +141,37 @@ ifeq ($(CXX),g++)
GCC_MINOR_GTEQ_9 := $(shell expr `gcc -dumpversion | cut -f2 -d.` \>= 9)
ifeq ("$(GCC_MAJOR_EQ_4)","1")
ifeq ("$(GCC_MINOR_GTEQ_7)","1")
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++0x -DHAS_TLS=0
PLATFORM_CFLAGS = -Wall -Werror=return-type -DHAS_TLS=0
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++0x -DHAS_TLS=0
else
ifeq ("$(GCC_MINOR_GTEQ_9)","1")
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
PLATFORM_CFLAGS = -Wall -Werror=return-type -DGCC_HAS_REGEX
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
else
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++11
PLATFORM_CFLAGS = -Wall -Werror=return-type
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++11
endif
endif
endif
ifeq ("$(GCC_MAJOR_GT_4)","1")
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
PLATFORM_CFLAGS = -Wall -Werror=return-type -DGCC_HAS_REGEX
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
endif
else
ifeq ($(CXX),g++-5)
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
PLATFORM_CFLAGS = -Wall -Werror=return-type -DGCC_HAS_REGEX
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
else
ifeq ($(CXX),g++-4.9)
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
PLATFORM_CFLAGS = -Wall -Werror=return-type -DGCC_HAS_REGEX
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++14 -DGCC_HAS_REGEX
else
ifeq ($(CXX),g++-4.8)
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++11
PLATFORM_CFLAGS = -Wall -Werror=return-type
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++11
else
PLATFORM_CFLAGS = -Wall -Werror=return-type -std=c++11
PLATFORM_CFLAGS = -Wall -Werror=return-type
PLATFORM_CXXFLAGS = -Wall -Werror=return-type -std=c++11
endif
endif
endif
Expand Down

0 comments on commit 9eabc1c

Please sign in to comment.