Mercurial > hg > truffle
comparison make/solaris/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 | 95009f678859 |
comparison
equal
deleted
inserted
replaced
1982:6a2d73358ff7 | 1983:c760f78e0a53 |
---|---|
45 $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) | 45 $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) |
46 | 46 |
47 | 47 |
48 # check for precompiled headers support | 48 # check for precompiled headers support |
49 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" | 49 ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" |
50 # Allow the user to turn off precompiled headers from the command line. | |
51 ifneq ($(USE_PRECOMPILED_HEADER),0) | |
50 USE_PRECOMPILED_HEADER=1 | 52 USE_PRECOMPILED_HEADER=1 |
51 PRECOMPILED_HEADER_DIR=. | 53 PRECOMPILED_HEADER_DIR=. |
52 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp | 54 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled.hpp |
53 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch | 55 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch |
56 endif | |
54 endif | 57 endif |
55 | 58 |
56 | 59 |
57 #------------------------------------------------------------------------ | 60 #------------------------------------------------------------------------ |
58 # Compiler flags | 61 # Compiler flags |
136 # Flags for generating make dependency flags. | 139 # Flags for generating make dependency flags. |
137 ifneq ("${CC_VER_MAJOR}", "2") | 140 ifneq ("${CC_VER_MAJOR}", "2") |
138 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) | 141 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) |
139 endif | 142 endif |
140 | 143 |
144 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. | |
145 ifneq ($(USE_PRECOMPILED_HEADER),1) | |
146 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER | |
147 endif | |
148 | |
141 #------------------------------------------------------------------------ | 149 #------------------------------------------------------------------------ |
142 # Linker flags | 150 # Linker flags |
143 | 151 |
144 # statically link libstdc++.so, work with gcc but ignored by g++ | 152 # statically link libstdc++.so, work with gcc but ignored by g++ |
145 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic | 153 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic |