Merge
authorkatleman
Tue, 26 Feb 2013 13:23:55 -0800
changeset 15826 be636f472ce6
parent 15771 afa7c9d26291 (current diff)
parent 15825 cbb8bc2c35da (diff)
child 15827 30e856716741
Merge
--- a/jdk/make/common/Defs-macosx.gmk	Thu Feb 21 11:13:23 2013 -0800
+++ b/jdk/make/common/Defs-macosx.gmk	Tue Feb 26 13:23:55 2013 -0800
@@ -406,10 +406,16 @@
 
 LIB_LOCATION ?= $(LIBDIR)
 
-# Adding these macros will make it an error to link to mac APIs newer than OS version 10.7
-ifeq ($(MACOSX_REQUIRED_VERSION),)
-  MACOSX_REQUIRED_VERSION:=1070
+# Setting these parameters makes it an error to link to macosx APIs that are 
+# newer than the given OS version and makes the linked binaries compatible even
+# if built on a newer version of the OS.
+# The expected format is X.Y.Z
+ifeq ($(MACOSX_VERSION_MIN),)
+  MACOSX_VERSION_MIN=10.7.0
 endif
-MACOSX_OS_VERSION_CFLAGS := -DMAC_OS_X_VERSION_MAX_ALLOWED=$(MACOSX_REQUIRED_VERSION) -DMAC_OS_X_VERSION_MIN_REQUIRED=$(MACOSX_REQUIRED_VERSION)
+# The macro takes the version with no dots, ex: 1070
+MACOSX_OS_VERSION_CFLAGS := -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
+			    -mmacosx-version-min=$(MACOSX_VERSION_MIN)
 OTHER_CFLAGS += $(MACOSX_OS_VERSION_CFLAGS)
 OTHER_CXXFLAGS += $(MACOSX_OS_VERSION_CFLAGS)
+OTHER_LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
--- a/jdk/make/common/shared/Compiler-msvc.gmk	Thu Feb 21 11:13:23 2013 -0800
+++ b/jdk/make/common/shared/Compiler-msvc.gmk	Tue Feb 26 13:23:55 2013 -0800
@@ -28,6 +28,7 @@
 #
 
 ifeq ($(PLATFORM), windows)
+ifndef CONFIGURE_BUILD
   CC           = $(COMPILER_PATH)cl
   CPP          = $(COMPILER_PATH)cl
   CXX          = $(COMPILER_PATH)cl
@@ -36,7 +37,7 @@
   LINK         = $(COMPILER_PATH)link
   LINK32       = $(LINK)
   DUMPBIN      = $(COMPILER_PATH)dumpbin.exe
- 
+
   # Fill in unknown values
   COMPILER_NAME=Unknown MSVC Compiler
   COMPILER_VERSION=
@@ -87,6 +88,6 @@
   SHARED_LIBRARY_FLAG = -LD
   # RSC is always same as RC (Not sure who uses this RSC variable)
   RSC = $(RC)
-
+endif 
 endif
 
--- a/jdk/make/common/shared/Defs-utils.gmk	Thu Feb 21 11:13:23 2013 -0800
+++ b/jdk/make/common/shared/Defs-utils.gmk	Tue Feb 26 13:23:55 2013 -0800
@@ -74,22 +74,24 @@
   UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
 endif
 
-# Utilities
-ifdef CROSS_COMPILE_ARCH
-  AR             = $(COMPILER_PATH)ar
-  AS             = $(COMPILER_PATH)as
-  LD             = $(COMPILER_PATH)ld
-  MCS            = $(COMPILER_PATH)mcs
-  NM             = $(COMPILER_PATH)nm
-  STRIP          = $(COMPILER_PATH)strip
-else
-  AR             = $(UTILS_CCS_BIN_PATH)ar
-  AS             = $(UTILS_CCS_BIN_PATH)as
-  LD             = $(UTILS_CCS_BIN_PATH)ld
-  MCS            = $(UTILS_CCS_BIN_PATH)mcs
-  NM             = $(UTILS_CCS_BIN_PATH)nm
-  STRIP          = $(UTILS_CCS_BIN_PATH)strip
-endif
+ifndef CONFIGURE_BUILD
+  # Utilities
+  ifdef CROSS_COMPILE_ARCH
+    AR             = $(COMPILER_PATH)ar
+    AS             = $(COMPILER_PATH)as
+    LD             = $(COMPILER_PATH)ld
+    MCS            = $(COMPILER_PATH)mcs
+    NM             = $(COMPILER_PATH)nm
+    STRIP          = $(COMPILER_PATH)strip
+  else
+    AR             = $(UTILS_CCS_BIN_PATH)ar
+    AS             = $(UTILS_CCS_BIN_PATH)as
+    LD             = $(UTILS_CCS_BIN_PATH)ld
+    MCS            = $(UTILS_CCS_BIN_PATH)mcs
+    NM             = $(UTILS_CCS_BIN_PATH)nm
+    STRIP          = $(UTILS_CCS_BIN_PATH)strip
+  endif
+endif # CONFIGURE_BUILD
 
 ADB            = $(UTILS_COMMAND_PATH)adb
 BASENAME       = $(UTILS_COMMAND_PATH)basename
--- a/jdk/makefiles/Images.gmk	Thu Feb 21 11:13:23 2013 -0800
+++ b/jdk/makefiles/Images.gmk	Tue Feb 26 13:23:55 2013 -0800
@@ -59,7 +59,7 @@
 	$(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@)
 	$(MKDIR) -p $(@D)
 	$(RM) $@
-	$(SED) 's/$$//g' $< > $@
+	LC_ALL=C $(SED) 's/$$//g' $< > $@
 	$(CHMOD) 444 $@
 endef