changeset 164:a5fa20d67f54

. Merge in changes from the equivalent Linux file. . Slightly reduce the diffs with the Linux version.
author glewis@misty.eyesbeyond.com
date Sat, 14 Nov 2009 16:14:12 -0800
parents 6cb747667733
children 8c3c1b874995
files make/common/Defs-bsd.gmk
diffstat 1 files changed, 33 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/make/common/Defs-bsd.gmk	Fri Nov 13 00:07:58 2009 -0800
+++ b/make/common/Defs-bsd.gmk	Sat Nov 14 16:14:12 2009 -0800
@@ -25,7 +25,7 @@
 
 #
 # Makefile to specify compiler flags for programs and libraries
-# targeted to Bsd.  Should not contain any rules.
+# targeted to BSD.  Should not contain any rules.
 #
 
 # Warning: the following variables are overriden by Defs.gmk. Set
@@ -40,6 +40,12 @@
 # Get shared JDK settings
 include $(BUILDDIR)/common/shared/Defs.gmk
 
+# Part of INCREMENTAL_BUILD mechanism.
+#   Compiler emits things like:  path/file.o: file.h
+#   We want something like: relative_path/file.o relative_path/file.d: file.h
+CC_DEPEND	 = -MM
+CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
+
 ifndef PLATFORM_SRC
   PLATFORM_SRC = $(TOPDIR)/src/solaris
 endif # PLATFORM_SRC
@@ -90,17 +96,26 @@
 LDFLAGS_COMMON_amd64    += -m64
 CFLAGS_REQUIRED_i586    += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
 LDFLAGS_COMMON_i586     += -m32
+CFLAGS_REQUIRED_ia64    += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_ia64     += -m64
+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
+LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
+CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
+LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
+ifeq ($(ZERO_BUILD), true)
+  CFLAGS_REQUIRED       =  $(ZERO_ARCHFLAG)
+  ifeq ($(ZERO_ENDIANNESS), little)
+    CFLAGS_REQUIRED     += -D_LITTLE_ENDIAN
+  endif
+  LDFLAGS_COMMON        += $(ZERO_ARCHFLAG)
+else
+  CFLAGS_REQUIRED       =  $(CFLAGS_REQUIRED_$(ARCH))
+  LDFLAGS_COMMON        += $(LDFLAGS_COMMON_$(ARCH))
+endif
 ifeq ($(OS_VENDOR),Apple)
   # 16-byte stack re-alignment on 32-bit Darwin
   CFLAGS_REQUIRED_i586 += -mstackrealign
 endif
-CFLAGS_REQUIRED_ia64    += -fno-omit-frame-pointer -D_LITTLE_ENDIAN
-CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
-LDFLAGS_COMMON_sparcv9  += -m64 -mcpu=v9
-CFLAGS_REQUIRED_sparc   += -m32 -mcpu=v9
-LDFLAGS_COMMON_sparc    += -m32 -mcpu=v9
-CFLAGS_REQUIRED         =  $(CFLAGS_REQUIRED_$(ARCH))
-LDFLAGS_COMMON          += $(LDFLAGS_COMMON_$(ARCH))
 
 # Add in platform specific optimizations for all opt levels
 CC_HIGHEST_OPT += $(_OPT_$(ARCH))
@@ -145,7 +160,7 @@
    CFLAGS_COMMON   += $(GLOBAL_KPIC) $(GCC_WARNINGS)
 endif
 
-# Bsd 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
 DEBUG_FLAG = -g
 ifeq ($(FASTDEBUG), true)
   ifeq ($(ARCH_DATA_MODEL), 64)
@@ -223,6 +238,15 @@
 endif
 
 #
+# Support for Quantify.
+#
+ifdef QUANTIFY
+QUANTIFY_CMD = quantify
+QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
+LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+endif
+
+#
 # Path and option to link against the VM, if you have to.  Note that
 # there are libraries that link against only -ljava, but they do get
 # -L to the -ljvm, this is because -ljava depends on -ljvm, whereas