Mercurial > hg > truffle
comparison make/linux/makefiles/gcc.make @ 1983:c760f78e0a53
7003125: precompiled.hpp is included when precompiled headers are not used
Summary: Added an ifndef DONT_USE_PRECOMPILED_HEADER to precompiled.hpp. Set up DONT_USE_PRECOMPILED_HEADER when compiling with Sun Studio or when the user specifies USE_PRECOMPILED_HEADER=0. Fixed broken include dependencies.
Reviewed-by: coleenp, kvn
author | stefank |
---|---|
date | Wed, 01 Dec 2010 15:04:06 +0100 |
parents | f95d63e2154a |
children | a5610f0862fe |
comparison
equal
deleted
inserted
replaced
1982:6a2d73358ff7 | 1983:c760f78e0a53 |
---|---|
40 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) | 40 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) |
41 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) | 41 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) |
42 | 42 |
43 # check for precompiled headers support | 43 # check for precompiled headers support |
44 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" | 44 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" |
45 # Allow the user to turn off precompiled headers from the command line. | |
46 ifneq ($(USE_PRECOMPILED_HEADER),0) | |
45 USE_PRECOMPILED_HEADER=1 | 47 USE_PRECOMPILED_HEADER=1 |
46 PRECOMPILED_HEADER_DIR=. | 48 PRECOMPILED_HEADER_DIR=. |
47 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp | 49 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp |
48 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch | 50 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch |
51 endif | |
49 endif | 52 endif |
50 | 53 |
51 | 54 |
52 #------------------------------------------------------------------------ | 55 #------------------------------------------------------------------------ |
53 # Compiler flags | 56 # Compiler flags |
146 endif | 149 endif |
147 | 150 |
148 # Flags for generating make dependency flags. | 151 # Flags for generating make dependency flags. |
149 ifneq ("${CC_VER_MAJOR}", "2") | 152 ifneq ("${CC_VER_MAJOR}", "2") |
150 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) | 153 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) |
154 endif | |
155 | |
156 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. | |
157 ifneq ($(USE_PRECOMPILED_HEADER),1) | |
158 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER | |
151 endif | 159 endif |
152 | 160 |
153 #------------------------------------------------------------------------ | 161 #------------------------------------------------------------------------ |
154 # Linker flags | 162 # Linker flags |
155 | 163 |