Mercurial > hg > truffle
diff make/bsd/makefiles/gcc.make @ 14521:29ccc4cbabca
Merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Wed, 12 Mar 2014 13:30:08 +0100 |
parents | 8c0e92c8c45b d8041d695d19 |
children | 4823ccaf5023 |
line wrap: on
line diff
--- a/make/bsd/makefiles/gcc.make Tue Mar 11 15:34:06 2014 +0100 +++ b/make/bsd/makefiles/gcc.make Wed Mar 12 13:30:08 2014 +0100 @@ -261,14 +261,13 @@ WARNINGS_ARE_ERRORS += -Wno-empty-body endif -WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef +WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef -Wunused-function -Wformat=2 -Wno-error=format-nonliteral -ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" +ifeq ($(USE_CLANG),) # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit # conversions which might affect the values. Only enable it in earlier versions. - WARNING_FLAGS = -Wunused-function - ifeq ($(USE_CLANG),) - WARNING_FLAGS += -Wconversion + ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" + WARNINGS_FLAGS += -Wconversion endif endif @@ -291,7 +290,7 @@ # The flags to use for an Optimized g++ build ifeq ($(OS_VENDOR), Darwin) # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy - # <http://wikis.sun.com/display/OpenJDK/Mac+OS+X+Port+Compilers> + # <https://wiki.openjdk.java.net/display/MacOSXPort/Compiler+Errata> OPT_CFLAGS_DEFAULT ?= SIZE else OPT_CFLAGS_DEFAULT ?= SPEED @@ -386,6 +385,11 @@ # statically link libstdc++.so, work with gcc but ignored by g++ STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic +# Ensure use libstdc++ on clang, not libc++ +ifeq ($(USE_CLANG), true) + LFLAGS += -stdlib=libstdc++ +endif + ifeq ($(USE_CLANG),) # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x. ifneq ("${CC_VER_MAJOR}", "2")