summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
4eac1ab)
Rely on the compiler version, to behave "more correctly" in case CXX is
just c++.
-fstack-protector \
--param=ssp-buffer-size=4
-fstack-protector \
--param=ssp-buffer-size=4
+COMPILER = $(shell $(CXX) -v 2>&1 | grep -q "clang version" && echo clang || echo gcc)
+
+ifeq ($(COMPILER), gcc)
CXXFLAGS += -Wunsafe-loop-optimizations \
-Wunused-but-set-variable
endif
CXXFLAGS += -Wunsafe-loop-optimizations \
-Wunused-but-set-variable
endif
+ifeq ($(COMPILER), clang)
LDFLAGS += -Qunused-arguments
endif
LDFLAGS += -Qunused-arguments
endif