never@3156: # dholmes@5299: # Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. never@3156: # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. never@3156: # never@3156: # This code is free software; you can redistribute it and/or modify it never@3156: # under the terms of the GNU General Public License version 2 only, as never@3156: # published by the Free Software Foundation. never@3156: # never@3156: # This code is distributed in the hope that it will be useful, but WITHOUT never@3156: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or never@3156: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License never@3156: # version 2 for more details (a copy is included in the LICENSE file that never@3156: # accompanied this code). never@3156: # never@3156: # You should have received a copy of the GNU General Public License version never@3156: # 2 along with this work; if not, write to the Free Software Foundation, never@3156: # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. never@3156: # never@3156: # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA never@3156: # or visit www.oracle.com if you need additional information or have any never@3156: # questions. never@3156: # never@3156: # never@3156: never@3156: OS_VENDOR = $(shell uname -s) never@3156: never@3156: #------------------------------------------------------------------------ erikj@3518: # CC, CXX & AS never@3156: erikj@3600: # If a SPEC is not set already, then use these defaults. erikj@3600: ifeq ($(SPEC),) erikj@3600: # When cross-compiling the ALT_COMPILER_PATH points erikj@3600: # to the cross-compilation toolset erikj@3600: ifdef CROSS_COMPILE_ARCH erikj@3600: CXX = $(ALT_COMPILER_PATH)/g++ erikj@3600: CC = $(ALT_COMPILER_PATH)/gcc erikj@3600: HOSTCXX = g++ erikj@3600: HOSTCC = gcc erikj@3600: else ifneq ($(OS_VENDOR), Darwin) erikj@3600: CXX = g++ erikj@3600: CC = gcc erikj@3600: HOSTCXX = $(CXX) erikj@3600: HOSTCC = $(CC) erikj@3600: endif erikj@3600: erikj@3600: # i486 hotspot requires -mstackrealign on Darwin. erikj@3600: # llvm-gcc supports this in Xcode 3.2.6 and 4.0. erikj@3600: # gcc-4.0 supports this on earlier versions. erikj@3600: # Prefer llvm-gcc where available. erikj@3600: ifeq ($(OS_VENDOR), Darwin) erikj@3600: ifeq ($(origin CXX), default) erikj@3600: CXX = llvm-g++ erikj@3600: endif erikj@3600: ifeq ($(origin CC), default) erikj@3600: CC = llvm-gcc erikj@3600: endif erikj@3600: erikj@3600: ifeq ($(ARCH), i486) erikj@3600: LLVM_SUPPORTS_STACKREALIGN := $(shell \ erikj@3600: [ "0"`llvm-gcc -v 2>&1 | grep LLVM | sed -E "s/.*LLVM build ([0-9]+).*/\1/"` -gt "2333" ] \ erikj@3600: && echo true || echo false) erikj@3600: erikj@3600: ifeq ($(LLVM_SUPPORTS_STACKREALIGN), true) erikj@3600: CXX32 ?= llvm-g++ erikj@3600: CC32 ?= llvm-gcc erikj@3600: else erikj@3600: CXX32 ?= g++-4.0 erikj@3600: CC32 ?= gcc-4.0 erikj@3600: endif erikj@3600: CXX = $(CXX32) erikj@3600: CC = $(CC32) erikj@3600: endif erikj@3600: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: CXX = clang++ simonis@5230: CC = clang simonis@5230: endif simonis@5230: erikj@3600: HOSTCXX = $(CXX) erikj@3600: HOSTCC = $(CC) erikj@3600: endif erikj@3600: dsamersoff@5671: AS = $(CC) -c dcubed@3202: endif dcubed@3202: dcubed@5898: ifeq ($(OS_VENDOR), Darwin) dcubed@5898: ifeq ($(DSYMUTIL),) dcubed@5898: DSYMUTIL=dsymutil dcubed@5898: endif dcubed@5898: endif never@3156: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: CC_VER_MAJOR := $(shell $(CC) -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/" | cut -d'.' -f1) simonis@5230: CC_VER_MINOR := $(shell $(CC) -v 2>&1 | grep version | sed "s/.*version \([0-9]*\.[0-9]*\).*/\1/" | cut -d'.' -f2) simonis@5230: else simonis@5230: # -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only simonis@5230: # prints the numbers (e.g. "2.95", "3.2.1") simonis@5230: CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) simonis@5230: CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) never@3156: endif never@3156: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: # clang has precompiled headers support by default, but the user can switch simonis@5230: # it off by using 'USE_PRECOMPILED_HEADER=0'. simonis@5230: ifdef LP64 simonis@5230: ifeq ($(USE_PRECOMPILED_HEADER),) simonis@5230: USE_PRECOMPILED_HEADER=1 simonis@5230: endif simonis@5230: else simonis@5230: # We don't support precompiled headers on 32-bit builds because there some files are simonis@5230: # compiled with -fPIC while others are compiled without (see 'NONPIC_OBJ_FILES' rules.make) simonis@5230: # Clang produces an error if the PCH file was compiled with other options than the actual compilation unit. simonis@5230: USE_PRECOMPILED_HEADER=0 simonis@5230: endif simonis@5230: simonis@5230: ifeq ($(USE_PRECOMPILED_HEADER),1) simonis@5230: simonis@5230: ifndef LP64 simonis@5230: $(error " Precompiled Headers only supported on 64-bit platforms!") simonis@5230: endif simonis@5230: simonis@5230: PRECOMPILED_HEADER_DIR=. simonis@5230: PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp simonis@5230: PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.pch simonis@5230: simonis@5230: PCH_FLAG = -include precompiled.hpp simonis@5230: PCH_FLAG/DEFAULT = $(PCH_FLAG) simonis@5230: PCH_FLAG/NO_PCH = -DNO_PCH simonis@5230: PCH_FLAG/BY_FILE = $(PCH_FLAG/$@)$(PCH_FLAG/DEFAULT$(PCH_FLAG/$@)) simonis@5230: simonis@5230: VM_PCH_FLAG/LIBJVM = $(PCH_FLAG/BY_FILE) simonis@5230: VM_PCH_FLAG/AOUT = simonis@5230: VM_PCH_FLAG = $(VM_PCH_FLAG/$(LINK_INTO)) simonis@5230: simonis@5230: # We only use precompiled headers for the JVM build simonis@5230: CFLAGS += $(VM_PCH_FLAG) hseigel@5619: hseigel@5619: # The following files are compiled at various optimization hseigel@5619: # levels due to optimization issues encountered at the hseigel@5619: # 'OPT_CFLAGS_DEFAULT' level. The Clang compiler issues a compile hseigel@5619: # time error if there is an optimization level specification hseigel@5619: # skew between the PCH file and the C++ file. Especially if the hseigel@5619: # PCH file is compiled at a higher optimization level than hseigel@5619: # the C++ file. One solution might be to prepare extra optimization hseigel@5619: # level specific PCH files for the opt build and use them here, but hseigel@5619: # it's probably not worth the effort as long as only a few files hseigel@5619: # need this special handling. simonis@5230: PCH_FLAG/loopTransform.o = $(PCH_FLAG/NO_PCH) simonis@5230: PCH_FLAG/sharedRuntimeTrig.o = $(PCH_FLAG/NO_PCH) simonis@5230: PCH_FLAG/sharedRuntimeTrans.o = $(PCH_FLAG/NO_PCH) hseigel@5611: PCH_FLAG/unsafe.o = $(PCH_FLAG/NO_PCH) simonis@5230: simonis@5230: endif simonis@5230: else # ($(USE_CLANG), true) simonis@5230: # check for precompiled headers support simonis@5230: ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 4 \) \))" "0" simonis@5230: # Allow the user to turn off precompiled headers from the command line. simonis@5230: ifneq ($(USE_PRECOMPILED_HEADER),0) simonis@5230: PRECOMPILED_HEADER_DIR=. simonis@5230: PRECOMPILED_HEADER_SRC=$(GAMMADIR)/src/share/vm/precompiled/precompiled.hpp simonis@5230: PRECOMPILED_HEADER=$(PRECOMPILED_HEADER_DIR)/precompiled.hpp.gch simonis@5230: endif simonis@5230: endif simonis@5230: endif simonis@5230: simonis@5230: # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. simonis@5230: ifeq ($(USE_PRECOMPILED_HEADER),0) simonis@5230: CFLAGS += -DDONT_USE_PRECOMPILED_HEADER simonis@5230: endif never@3156: never@3156: #------------------------------------------------------------------------ never@3156: # Compiler flags never@3156: never@3156: # position-independent code never@3156: PICFLAG = -fPIC never@3156: never@3156: VM_PICFLAG/LIBJVM = $(PICFLAG) never@3156: VM_PICFLAG/AOUT = never@3156: VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) never@3156: erikj@3649: ifeq ($(JVM_VARIANT_ZERO), true) erikj@3649: CFLAGS += $(LIBFFI_CFLAGS) never@3156: endif erikj@3649: ifeq ($(JVM_VARIANT_ZEROSHARK), true) erikj@3649: CFLAGS += $(LIBFFI_CFLAGS) erikj@3649: CFLAGS += $(LLVM_CFLAGS) never@3156: endif never@3156: CFLAGS += $(VM_PICFLAG) never@3156: CFLAGS += -fno-rtti never@3156: CFLAGS += -fno-exceptions simonis@5230: ifeq ($(USE_CLANG),) simonis@5230: CFLAGS += -pthread simonis@5230: CFLAGS += -fcheck-new simonis@5230: # version 4 and above support fvisibility=hidden (matches jni_x86.h file) simonis@5230: # except 4.1.2 gives pointless warnings that can't be disabled (afaik) simonis@5230: ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" simonis@5230: CFLAGS += -fvisibility=hidden simonis@5230: endif simonis@5230: else simonis@5230: CFLAGS += -fvisibility=hidden simonis@5230: endif simonis@5230: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: # Before Clang 3.1, we had to pass the stack alignment specification directly to llvm with the help of '-mllvm' simonis@5230: # Starting with version 3.1, Clang understands the '-mstack-alignment' (and rejects '-mllvm -stack-alignment') simonis@5230: ifneq "$(shell expr \( $(CC_VER_MAJOR) \> 3 \) \| \( \( $(CC_VER_MAJOR) = 3 \) \& \( $(CC_VER_MINOR) \>= 1 \) \))" "0" simonis@5230: STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mstack-alignment=16 simonis@5230: else simonis@5230: STACK_ALIGNMENT_OPT = -mno-omit-leaf-frame-pointer -mllvm -stack-alignment=16 simonis@5230: endif never@3156: endif never@3156: never@3156: ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) never@3156: ARCHFLAG/i486 = -m32 -march=i586 simonis@5230: ARCHFLAG/amd64 = -m64 $(STACK_ALIGNMENT_OPT) never@3156: ARCHFLAG/ia64 = never@3156: ARCHFLAG/sparc = -m32 -mcpu=v9 never@3156: ARCHFLAG/sparcv9 = -m64 -mcpu=v9 never@3156: ARCHFLAG/zero = $(ZERO_ARCHFLAG) never@3156: never@3156: # Darwin-specific build flags never@3156: ifeq ($(OS_VENDOR), Darwin) never@3156: # Ineffecient 16-byte stack re-alignment on Darwin/IA32 never@3156: ARCHFLAG/i486 += -mstackrealign never@3156: endif never@3156: never@3156: CFLAGS += $(ARCHFLAG) never@3156: AOUT_FLAGS += $(ARCHFLAG) never@3156: LFLAGS += $(ARCHFLAG) never@3156: ASFLAGS += $(ARCHFLAG) never@3156: never@3156: ifdef E500V2 never@3156: CFLAGS += -DE500V2 never@3156: endif never@3156: never@3156: # Use C++ Interpreter never@3156: ifdef CC_INTERP never@3156: CFLAGS += -DCC_INTERP never@3156: endif never@3156: never@3156: # Keep temporary files (.ii, .s) never@3156: ifdef NEED_ASM never@3156: CFLAGS += -save-temps never@3156: else never@3156: CFLAGS += -pipe never@3156: endif never@3156: never@3156: # Compiler warnings are treated as errors dcubed@3202: ifneq ($(COMPILER_WARNINGS_FATAL),false) dcubed@3202: WARNINGS_ARE_ERRORS = -Werror dcubed@3202: endif never@3156: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: # However we need to clean the code up before we can unrestrictedly enable this option with Clang twisti@5797: WARNINGS_ARE_ERRORS += -Wno-logical-op-parentheses -Wno-parentheses-equality -Wno-parentheses simonis@5230: WARNINGS_ARE_ERRORS += -Wno-switch -Wno-tautological-compare simonis@5230: # Not yet supported by clang in Xcode 4.6.2 simonis@5230: # WARNINGS_ARE_ERRORS += -Wno-tautological-constant-out-of-range-compare simonis@5230: WARNINGS_ARE_ERRORS += -Wno-delete-non-virtual-dtor -Wno-deprecated -Wno-format -Wno-dynamic-class-memaccess twisti@5545: WARNINGS_ARE_ERRORS += -Wno-empty-body simonis@5230: endif simonis@5230: jprovino@4722: WARNING_FLAGS = -Wpointer-arith -Wsign-compare -Wundef simonis@5230: simonis@5230: ifeq "$(shell expr \( $(CC_VER_MAJOR) \> 4 \) \| \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 3 \) \))" "0" simonis@5230: # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit simonis@5230: # conversions which might affect the values. Only enable it in earlier versions. simonis@5230: WARNING_FLAGS = -Wunused-function simonis@5230: ifeq ($(USE_CLANG),) twisti@5797: WARNING_FLAGS += -Wconversion simonis@5230: endif never@3156: endif never@3156: jprovino@4722: CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(WARNING_FLAGS) never@3156: # Special cases never@3156: CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) never@3156: # XXXDARWIN: for _dyld_bind_fully_image_containing_address never@3156: ifeq ($(OS_VENDOR), Darwin) never@3156: CFLAGS_WARN/os_bsd.o = $(CFLAGS_WARN/DEFAULT) -Wno-deprecated-declarations never@3156: endif never@3156: jprovino@4165: OPT_CFLAGS/SIZE=-Os jprovino@4165: OPT_CFLAGS/SPEED=-O3 jprovino@4165: jprovino@4165: # Hotspot uses very unstrict aliasing turn this optimization off jprovino@4165: # This option is added to CFLAGS rather than OPT_CFLAGS jprovino@4165: # so that OPT_CFLAGS overrides get this option too. jprovino@4165: CFLAGS += -fno-strict-aliasing never@3156: never@3156: # The flags to use for an Optimized g++ build dcubed@3202: ifeq ($(OS_VENDOR), Darwin) dcubed@3202: # use -Os by default, unless -O3 can be proved to be worth the cost, as per policy dcubed@3202: # jprovino@4165: OPT_CFLAGS_DEFAULT ?= SIZE dcubed@3202: else jprovino@4165: OPT_CFLAGS_DEFAULT ?= SPEED dcubed@3202: endif never@3156: jprovino@4165: ifdef OPT_CFLAGS jprovino@4165: ifneq ("$(origin OPT_CFLAGS)", "command line") jprovino@4165: $(error " Use OPT_EXTRAS instead of OPT_CFLAGS to add extra flags to OPT_CFLAGS.") jprovino@4165: endif jprovino@4165: endif never@3156: jprovino@4165: OPT_CFLAGS = $(OPT_CFLAGS/$(OPT_CFLAGS_DEFAULT)) $(OPT_EXTRAS) jprovino@4165: jprovino@4165: # The gcc compiler segv's on ia64 when compiling bytecodeInterpreter.cpp never@3156: # if we use expensive-optimizations never@3156: ifeq ($(BUILDARCH), ia64) never@3156: OPT_CFLAGS += -fno-expensive-optimizations never@3156: endif never@3156: never@3156: OPT_CFLAGS/NOOPT=-O0 never@3156: simonis@5230: # Work around some compiler bugs. simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 2), 1) simonis@5230: OPT_CFLAGS/loopTransform.o += $(OPT_CFLAGS/NOOPT) hseigel@5619: OPT_CFLAGS/unsafe.o += -O1 simonis@5230: endif simonis@5230: else simonis@5230: # 6835796. Problem in GCC 4.3.0 with mulnode.o optimized compilation. simonis@5230: ifeq ($(shell expr $(CC_VER_MAJOR) = 4 \& $(CC_VER_MINOR) = 3), 1) simonis@5230: OPT_CFLAGS/mulnode.o += $(OPT_CFLAGS/NOOPT) simonis@5230: endif never@3156: endif never@3156: never@3156: # Flags for generating make dependency flags. simonis@5230: DEPFLAGS = -MMD -MP -MF $(DEP_DIR)/$(@:%=%.d) simonis@5230: ifeq ($(USE_CLANG),) simonis@5230: ifneq ($(CC_VER_MAJOR), 2) simonis@5230: DEPFLAGS += -fpch-deps simonis@5230: endif never@3156: endif never@3156: never@3156: # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. stefank@3325: ifeq ($(USE_PRECOMPILED_HEADER),0) never@3156: CFLAGS += -DDONT_USE_PRECOMPILED_HEADER never@3156: endif never@3156: erikj@4682: ifeq ($(OS_VENDOR), Darwin) erikj@4682: # Setting these parameters makes it an error to link to macosx APIs that are erikj@4682: # newer than the given OS version and makes the linked binaries compatible even erikj@4682: # if built on a newer version of the OS. erikj@4682: # The expected format is X.Y.Z erikj@4682: ifeq ($(MACOSX_VERSION_MIN),) erikj@4682: MACOSX_VERSION_MIN=10.7.0 erikj@4682: endif erikj@4682: # The macro takes the version with no dots, ex: 1070 erikj@4682: CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \ erikj@4682: -mmacosx-version-min=$(MACOSX_VERSION_MIN) erikj@4682: LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN) erikj@4682: endif erikj@4682: dsamersoff@5671: dsamersoff@5671: #------------------------------------------------------------------------ dsamersoff@5671: # Assembler flags dsamersoff@5671: dsamersoff@5671: # Enforce prerpocessing of .s files dsamersoff@5671: ASFLAGS += -x assembler-with-cpp dsamersoff@5671: never@3156: #------------------------------------------------------------------------ never@3156: # Linker flags never@3156: never@3156: # statically link libstdc++.so, work with gcc but ignored by g++ never@3156: STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic never@3156: simonis@5230: ifeq ($(USE_CLANG),) simonis@5230: # statically link libgcc and/or libgcc_s, libgcc does not exist before gcc-3.x. simonis@5230: ifneq ("${CC_VER_MAJOR}", "2") simonis@5230: STATIC_LIBGCC += -static-libgcc simonis@5230: endif never@3156: simonis@5230: ifeq ($(BUILDARCH), ia64) simonis@5230: LFLAGS += -Wl,-relax simonis@5230: endif never@3156: endif never@3156: never@3156: # Use $(MAPFLAG:FILENAME=real_file_name) to specify a map file. never@3156: MAPFLAG = -Xlinker --version-script=FILENAME never@3156: never@3156: # never@3156: # Shared Library never@3156: # never@3156: ifeq ($(OS_VENDOR), Darwin) never@3156: # Standard linker flags never@3156: LFLAGS += never@3156: dholmes@5299: # The apple linker has its own variant of mapfiles/version-scripts dholmes@5299: MAPFLAG = -Xlinker -exported_symbols_list -Xlinker FILENAME never@3156: never@3156: # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj never@3156: SONAMEFLAG = never@3156: never@3156: # Build shared library dcubed@3202: SHARED_FLAG = -Wl,-install_name,@rpath/$(@F) -dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $(VM_PICFLAG) never@3156: never@3156: # Keep symbols even they are not used never@3156: #AOUT_FLAGS += -Xlinker -export-dynamic never@3156: else never@3156: # Enable linker optimization never@3156: LFLAGS += -Xlinker -O1 never@3156: never@3156: # Use $(SONAMEFLAG:SONAME=soname) to specify the intrinsic name of a shared obj never@3156: SONAMEFLAG = -Xlinker -soname=SONAME never@3156: never@3156: # Build shared library never@3156: SHARED_FLAG = -shared $(VM_PICFLAG) never@3156: never@3156: # Keep symbols even they are not used never@3156: AOUT_FLAGS += -Xlinker -export-dynamic never@3156: endif never@3156: never@3156: #------------------------------------------------------------------------ never@3156: # Debug flags never@3156: simonis@5230: ifeq ($(USE_CLANG), true) simonis@5230: # Restrict the debug information created by Clang to avoid simonis@5230: # too big object files and speed the build up a little bit simonis@5230: # (see http://llvm.org/bugs/show_bug.cgi?id=7554) simonis@5230: CFLAGS += -flimit-debug-info never@3156: endif never@3156: simonis@5230: # DEBUG_BINARIES uses full -g debug information for all configs never@3156: ifeq ($(DEBUG_BINARIES), true) simonis@5230: CFLAGS += -g simonis@5230: else simonis@5230: # Use the stabs format for debugging information (this is the default simonis@5230: # on gcc-2.91). It's good enough, has all the information about line simonis@5230: # numbers and local variables, and libjvm.so is only about 16M. simonis@5230: # Change this back to "-g" if you want the most expressive format. simonis@5230: # (warning: that could easily inflate libjvm.so to 150M!) simonis@5230: # Note: The Itanium gcc compiler crashes when using -gstabs. simonis@5230: DEBUG_CFLAGS/ia64 = -g simonis@5230: DEBUG_CFLAGS/amd64 = -g simonis@5230: DEBUG_CFLAGS/arm = -g simonis@5230: DEBUG_CFLAGS/ppc = -g simonis@5230: DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) simonis@5230: ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) simonis@5230: DEBUG_CFLAGS += -gstabs simonis@5230: endif dcubed@5898: dcubed@5898: ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1) dcubed@5898: FASTDEBUG_CFLAGS/ia64 = -g dcubed@5898: FASTDEBUG_CFLAGS/amd64 = -g dcubed@5898: FASTDEBUG_CFLAGS/arm = -g dcubed@5898: FASTDEBUG_CFLAGS/ppc = -g dcubed@5898: FASTDEBUG_CFLAGS += $(FASTDEBUG_CFLAGS/$(BUILDARCH)) dcubed@5898: ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),) dcubed@5898: ifeq ($(USE_CLANG), true) dcubed@5898: # Clang doesn't understand -gstabs dcubed@5898: FASTDEBUG_CFLAGS += -g dcubed@5898: else dcubed@5898: FASTDEBUG_CFLAGS += -gstabs dcubed@5898: endif dcubed@5898: endif dcubed@5898: dcubed@5898: OPT_CFLAGS/ia64 = -g dcubed@5898: OPT_CFLAGS/amd64 = -g dcubed@5898: OPT_CFLAGS/arm = -g dcubed@5898: OPT_CFLAGS/ppc = -g dcubed@5898: OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH)) dcubed@5898: ifeq ($(OPT_CFLAGS/$(BUILDARCH)),) dcubed@5898: ifeq ($(USE_CLANG), true) dcubed@5898: # Clang doesn't understand -gstabs dcubed@5898: OPT_CFLAGS += -g dcubed@5898: else dcubed@5898: OPT_CFLAGS += -gstabs dcubed@5898: endif dcubed@5898: endif dcubed@5898: endif never@3156: endif never@3156: never@3156: # If we are building HEADLESS, pass on to VM never@3156: # so it can set the java.awt.headless property never@3156: ifdef HEADLESS never@3156: CFLAGS += -DHEADLESS never@3156: endif never@3156: never@3156: # We are building Embedded for a small device never@3156: # favor code space over speed never@3156: ifdef MINIMIZE_RAM_USAGE never@3156: CFLAGS += -DMINIMIZE_RAM_USAGE never@3156: endif