< prev index next >

make/linux/makefiles/gcc.make

Print this page




 133 
 134 # position-independent code
 135 PICFLAG = -fPIC
 136 
 137 VM_PICFLAG/LIBJVM = $(PICFLAG)
 138 VM_PICFLAG/AOUT   =
 139 VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
 140 
 141 ifeq ($(JVM_VARIANT_ZERO), true)
 142 CFLAGS += $(LIBFFI_CFLAGS)
 143 endif
 144 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
 145 CFLAGS += $(LIBFFI_CFLAGS)
 146 CFLAGS += $(LLVM_CFLAGS)
 147 endif
 148 CFLAGS += $(VM_PICFLAG)
 149 CFLAGS += -fno-rtti
 150 CFLAGS += -fno-exceptions
 151 CFLAGS += -D_REENTRANT
 152 ifeq ($(USE_CLANG),)
 153   CFLAGS += -fcheck-new
 154   # version 4 and above support fvisibility=hidden (matches jni_x86.h file)
 155   # except 4.1.2 gives pointless warnings that can't be disabled (afaik)
 156   ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 157     CFLAGS += -fvisibility=hidden
 158   endif
 159 else
 160   CFLAGS += -fvisibility=hidden
 161 endif
 162 
 163 ifeq ($(USE_CLANG), true)
 164   # Before Clang 3.1, we had to pass the stack alignment specification directly to llvm with the help of '-mllvm'
 165   # Starting with version 3.1, Clang understands the '-mstack-alignment' (and rejects '-mllvm -stack-alignment')
 166   ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 1 \) \))" "0"
 167     STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mstack-alignment=16
 168   else
 169     STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mllvm -stack-alignment=16
 170   endif
 171 endif
 172 
 173 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))


 247 
 248 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
 249 # if we use expensive-optimizations
 250 ifeq ($(BUILDARCH), ia64)
 251 OPT_CFLAGS += -fno-expensive-optimizations
 252 endif
 253 
 254 OPT_CFLAGS/NOOPT=-O0
 255 
 256 # Work around some compiler bugs.
 257 ifeq ($(USE_CLANG), true)
 258   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
 259     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
 260   endif
 261 else
 262   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
 263   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
 264     OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
 265   endif
 266 endif



 267 
 268 # Flags for generating make dependency flags.
 269 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 270 ifeq ($(USE_CLANG),)
 271   ifneq ("${CC_VER_MAJOR}", "2")
 272     DEPFLAGS += -fpch-deps
 273   endif
 274 endif
 275 
 276 #------------------------------------------------------------------------
 277 # Linker flags
 278 
 279 # statically link libstdc++.so, work with gcc but ignored by g++
 280 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
 281 # While the VM needs the above line, adlc needs a separate setting:
 282 ADLC_STATIC_STDCXX = -static-libstdc++
 283 
 284 ifeq ($(USE_CLANG),)
 285   # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
 286   ifneq ("${CC_VER_MAJOR}", "2")




 133 
 134 # position-independent code
 135 PICFLAG = -fPIC
 136 
 137 VM_PICFLAG/LIBJVM = $(PICFLAG)
 138 VM_PICFLAG/AOUT   =
 139 VM_PICFLAG        = $(VM_PICFLAG/$(LINK_INTO))
 140 
 141 ifeq ($(JVM_VARIANT_ZERO), true)
 142 CFLAGS += $(LIBFFI_CFLAGS)
 143 endif
 144 ifeq ($(JVM_VARIANT_ZEROSHARK), true)
 145 CFLAGS += $(LIBFFI_CFLAGS)
 146 CFLAGS += $(LLVM_CFLAGS)
 147 endif
 148 CFLAGS += $(VM_PICFLAG)
 149 CFLAGS += -fno-rtti
 150 CFLAGS += -fno-exceptions
 151 CFLAGS += -D_REENTRANT
 152 ifeq ($(USE_CLANG),)
 153   CFLAGS += -fcheck-new -fstack-protector
 154   # version 4 and above support fvisibility=hidden (matches jni_x86.h file)
 155   # except 4.1.2 gives pointless warnings that can't be disabled (afaik)
 156   ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0"
 157     CFLAGS += -fvisibility=hidden
 158   endif
 159 else
 160   CFLAGS += -fvisibility=hidden
 161 endif
 162 
 163 ifeq ($(USE_CLANG), true)
 164   # Before Clang 3.1, we had to pass the stack alignment specification directly to llvm with the help of '-mllvm'
 165   # Starting with version 3.1, Clang understands the '-mstack-alignment' (and rejects '-mllvm -stack-alignment')
 166   ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 1 \) \))" "0"
 167     STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mstack-alignment=16
 168   else
 169     STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mllvm -stack-alignment=16
 170   endif
 171 endif
 172 
 173 ARCHFLAG = $(ARCHFLAG/$(BUILDARCH))


 247 
 248 # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp 
 249 # if we use expensive-optimizations
 250 ifeq ($(BUILDARCH), ia64)
 251 OPT_CFLAGS += -fno-expensive-optimizations
 252 endif
 253 
 254 OPT_CFLAGS/NOOPT=-O0
 255 
 256 # Work around some compiler bugs.
 257 ifeq ($(USE_CLANG), true)
 258   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1)
 259     OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT)
 260   endif
 261 else
 262   # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation.
 263   ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1)
 264     OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT)
 265   endif
 266 endif
 267 
 268 # Need extra inlining to collapse all the templated closures into the hot loop
 269 OPT_CFLAGS/shenandoahConcurrentMark.o += $(OPT_CFLAGS) --param inline-unit-growth=1000
 270 
 271 # Flags for generating make dependency flags.
 272 DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d)
 273 ifeq ($(USE_CLANG),)
 274   ifneq ("${CC_VER_MAJOR}", "2")
 275     DEPFLAGS += -fpch-deps
 276   endif
 277 endif
 278 
 279 #------------------------------------------------------------------------
 280 # Linker flags
 281 
 282 # statically link libstdc++.so, work with gcc but ignored by g++
 283 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic
 284 # While the VM needs the above line, adlc needs a separate setting:
 285 ADLC_STATIC_STDCXX = -static-libstdc++
 286 
 287 ifeq ($(USE_CLANG),)
 288   # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x.
 289   ifneq ("${CC_VER_MAJOR}", "2")


< prev index next >