Mercurial > hg > truffle
comparison make/linux/makefiles/gcc.make @ 356:1ee8caae33af
Merge
author | tonyp |
---|---|
date | Thu, 21 Aug 2008 23:36:31 -0400 |
parents | 9c2ecc2ffb12 |
children | 69c752d99841 |
comparison
equal
deleted
inserted
replaced
355:0edda524b58c | 356:1ee8caae33af |
---|---|
1 # | 1 # |
2 # Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. | 2 # Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved. |
3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 # | 4 # |
5 # This code is free software; you can redistribute it and/or modify it | 5 # This code is free software; you can redistribute it and/or modify it |
6 # under the terms of the GNU General Public License version 2 only, as | 6 # under the terms of the GNU General Public License version 2 only, as |
7 # published by the Free Software Foundation. | 7 # published by the Free Software Foundation. |
82 CFLAGS += -pipe | 82 CFLAGS += -pipe |
83 endif | 83 endif |
84 | 84 |
85 # Compiler warnings are treated as errors | 85 # Compiler warnings are treated as errors |
86 WARNINGS_ARE_ERRORS = -Werror | 86 WARNINGS_ARE_ERRORS = -Werror |
87 | |
87 # Except for a few acceptable ones | 88 # Except for a few acceptable ones |
89 # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit | |
90 # conversions which might affect the values. To avoid that, we need to turn | |
91 # it off explicitly. | |
92 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" | |
93 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wsign-compare | |
94 else | |
88 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare | 95 ACCEPTABLE_WARNINGS = -Wpointer-arith -Wconversion -Wsign-compare |
96 endif | |
97 | |
89 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) | 98 CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) |
90 # Special cases | 99 # Special cases |
91 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) | 100 CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) |
92 | 101 |
93 # The flags to use for an Optimized g++ build | 102 # The flags to use for an Optimized g++ build |