< prev index next >

make/linux/makefiles/gcc.make

Print this page




 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))
 174 ARCHFLAG/i486    = -m32 -march=i586
 175 ARCHFLAG/amd64   = -m64 $(STACK_ALIGNMENT_OPT)
 176 ARCHFLAG/ia64    =
 177 ARCHFLAG/sparc   = -m32 -mcpu=v9
 178 ARCHFLAG/sparcv9 = -m64 -mcpu=v9
 179 ARCHFLAG/arm     =  -fsigned-char
 180 ARCHFLAG/zero    = $(ZERO_ARCHFLAG)
 181 ifndef E500V2
 182 ARCHFLAG/ppc     =  -mcpu=powerpc
 183 endif
 184 ARCHFLAG/ppc64   =  -m64
 185 
 186 CFLAGS     += $(ARCHFLAG)
 187 AOUT_FLAGS += $(ARCHFLAG)
 188 LFLAGS     += $(ARCHFLAG)
 189 ASFLAGS    += $(ARCHFLAG)
 190 
 191 ifdef E500V2
 192 CFLAGS += -DE500V2
 193 endif
 194 
 195 # Use C++ Interpreter
 196 ifdef CC_INTERP
 197   CFLAGS += -DCC_INTERP
 198 endif
 199 
 200 # Keep temporary files (.ii, .s)
 201 ifdef NEED_ASM
 202   CFLAGS += -save-temps
 203 else
 204   CFLAGS += -pipe
 205 endif
 206 
 207 # Compiler warnings are treated as errors
 208 WARNINGS_ARE_ERRORS = -Werror
 209 
 210 ifeq ($(USE_CLANG), true)
 211   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 212   WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 213   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
 214   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess


 392 endif
 393 
 394 # If we are building HEADLESS, pass on to VM
 395 # so it can set the java.awt.headless property
 396 ifdef HEADLESS
 397 CFLAGS += -DHEADLESS
 398 endif
 399 
 400 # We are building Embedded for a small device
 401 # favor code space over speed
 402 ifdef MINIMIZE_RAM_USAGE
 403 CFLAGS += -DMINIMIZE_RAM_USAGE
 404 endif
 405 
 406 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
 407 # Explicitly specify -fno-omit-frame-pointer because it is off by default
 408 # starting with gcc 4.6.
 409 ifndef USE_SUNCC
 410   CFLAGS += -fno-omit-frame-pointer
 411 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))
 174 ARCHFLAG/i486    = -m32 -march=i586
 175 ARCHFLAG/amd64   = -m64 $(STACK_ALIGNMENT_OPT)
 176 ARCHFLAG/ia64    =
 177 ARCHFLAG/sparc   = -m32 -mcpu=v9
 178 ARCHFLAG/sparcv9 = -m64 -mcpu=v9

 179 ARCHFLAG/zero    = $(ZERO_ARCHFLAG)



 180 ARCHFLAG/ppc64   =  -m64
 181 
 182 CFLAGS     += $(ARCHFLAG)
 183 AOUT_FLAGS += $(ARCHFLAG)
 184 LFLAGS     += $(ARCHFLAG)
 185 ASFLAGS    += $(ARCHFLAG)
 186 




 187 # Use C++ Interpreter
 188 ifdef CC_INTERP
 189   CFLAGS += -DCC_INTERP
 190 endif
 191 
 192 # Keep temporary files (.ii, .s)
 193 ifdef NEED_ASM
 194   CFLAGS += -save-temps
 195 else
 196   CFLAGS += -pipe
 197 endif
 198 
 199 # Compiler warnings are treated as errors
 200 WARNINGS_ARE_ERRORS = -Werror
 201 
 202 ifeq ($(USE_CLANG), true)
 203   # However we need to clean the code up before we can unrestrictedly enable this option with Clang
 204   WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses
 205   WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-constant-out-of-range-compare -Wno-tautological-compare
 206   WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess


 384 endif
 385 
 386 # If we are building HEADLESS, pass on to VM
 387 # so it can set the java.awt.headless property
 388 ifdef HEADLESS
 389 CFLAGS += -DHEADLESS
 390 endif
 391 
 392 # We are building Embedded for a small device
 393 # favor code space over speed
 394 ifdef MINIMIZE_RAM_USAGE
 395 CFLAGS += -DMINIMIZE_RAM_USAGE
 396 endif
 397 
 398 # Stack walking in the JVM relies on frame pointer (%rbp) to walk thread stack.
 399 # Explicitly specify -fno-omit-frame-pointer because it is off by default
 400 # starting with gcc 4.6.
 401 ifndef USE_SUNCC
 402   CFLAGS += -fno-omit-frame-pointer
 403 endif
 404 
 405 -include $(HS_ALT_MAKE)/linux/makefiles/gcc.make
< prev index next >