make/solaris/makefiles/gcc.make

Print this page
rev 2852 : 7116081: USE_PRECOMPILED_HEADER=0 triggers a single threaded build of the JVM
Summary: Changed the conditional to see if the precompiled header has been specified. Also, removed the unused PrecompiledOption.
Reviewed-by: TBD1, TBD2


  32 Compiler = gcc
  33 
  34 # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
  35 # prints the numbers (e.g. "2.95", "3.2.1")
  36 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
  37 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
  38 
  39 # Check for the versions of C++ and C compilers ($CPP and $CC) used. 
  40 
  41 # Get the last thing on the line that looks like x.x+ (x is a digit).
  42 COMPILER_REV := \
  43 $(shell $(CPP) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
  44 C_COMPILER_REV := \
  45 $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
  46 
  47 
  48 # check for precompiled headers support
  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)
  52 USE_PRECOMPILED_HEADER=1
  53 PRECOMPILED_HEADER_DIR=.
  54 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
  55 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
  56 endif
  57 endif
  58 
  59 
  60 #------------------------------------------------------------------------
  61 # Compiler flags
  62 
  63 # position-independent code
  64 PICFLAG = -fPIC
  65 
  66 VM_PICFLAG/LIBJVM = $(PICFLAG)
  67 VM_PICFLAG/AOUT   =
  68 VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
  69 
  70 CFLAGS += $(VM_PICFLAG)
  71 CFLAGS += -fno-rtti
  72 CFLAGS += -fno-exceptions


 125 
 126 # Hotspot uses very unstrict aliasing turn this optimization off
 127 OPT_CFLAGS += -fno-strict-aliasing
 128 
 129 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
 130 # if we use expensive-optimizations
 131 # Note: all ia64 setting reflect the ones for linux
 132 # No actial testing was performed: there is no Solaris on ia64 presently
 133 ifeq ($(BUILDARCH), ia64)
 134 OPT_CFLAGS/bytecodeInterpreter.o += -fno-expensive-optimizations
 135 endif
 136 
 137 OPT_CFLAGS/NOOPT=-O0
 138 
 139 # Flags for generating make dependency flags.
 140 ifneq ("${CC_VER_MAJOR}", "2")
 141 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 142 endif
 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 
 149 #------------------------------------------------------------------------
 150 # Linker flags
 151 
 152 # statically link libstdc++.so, work with gcc but ignored by g++
 153 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
 154 
 155 # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
 156 ifneq ("${CC_VER_MAJOR}", "2")
 157 STATIC_LIBGCC += -static-libgcc
 158 endif
 159 
 160 ifeq ($(BUILDARCH), ia64)
 161 # Note: all ia64 setting reflect the ones for linux
 162 # No actial testing was performed: there is no Solaris on ia64 presently
 163 LFLAGS += -Wl,-relax
 164 endif
 165 




  32 Compiler = gcc
  33 
  34 # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only
  35 # prints the numbers (e.g. "2.95", "3.2.1")
  36 CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
  37 CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
  38 
  39 # Check for the versions of C++ and C compilers ($CPP and $CC) used. 
  40 
  41 # Get the last thing on the line that looks like x.x+ (x is a digit).
  42 COMPILER_REV := \
  43 $(shell $(CPP) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1)
  44 C_COMPILER_REV := \
  45 $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2)
  46 
  47 
  48 # check for precompiled headers support
  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)

  52 PRECOMPILED_HEADER_DIR=.
  53 PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp
  54 PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch
  55 endif
  56 endif
  57 
  58 
  59 #------------------------------------------------------------------------
  60 # Compiler flags
  61 
  62 # position-independent code
  63 PICFLAG = -fPIC
  64 
  65 VM_PICFLAG/LIBJVM = $(PICFLAG)
  66 VM_PICFLAG/AOUT   =
  67 VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
  68 
  69 CFLAGS += $(VM_PICFLAG)
  70 CFLAGS += -fno-rtti
  71 CFLAGS += -fno-exceptions


 124 
 125 # Hotspot uses very unstrict aliasing turn this optimization off
 126 OPT_CFLAGS += -fno-strict-aliasing
 127 
 128 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
 129 # if we use expensive-optimizations
 130 # Note: all ia64 setting reflect the ones for linux
 131 # No actial testing was performed: there is no Solaris on ia64 presently
 132 ifeq ($(BUILDARCH), ia64)
 133 OPT_CFLAGS/bytecodeInterpreter.o += -fno-expensive-optimizations
 134 endif
 135 
 136 OPT_CFLAGS/NOOPT=-O0
 137 
 138 # Flags for generating make dependency flags.
 139 ifneq ("${CC_VER_MAJOR}", "2")
 140 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 141 endif
 142 
 143 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
 144 ifeq ($(USE_PRECOMPILED_HEADER),0)
 145 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
 146 endif
 147 
 148 #------------------------------------------------------------------------
 149 # Linker flags
 150 
 151 # statically link libstdc++.so, work with gcc but ignored by g++
 152 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
 153 
 154 # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
 155 ifneq ("${CC_VER_MAJOR}", "2")
 156 STATIC_LIBGCC += -static-libgcc
 157 endif
 158 
 159 ifeq ($(BUILDARCH), ia64)
 160 # Note: all ia64 setting reflect the ones for linux
 161 # No actial testing was performed: there is no Solaris on ia64 presently
 162 LFLAGS += -Wl,-relax
 163 endif
 164