diff --git a/make/common/Defs-macosx.gmk b/make/common/Defs-macosx.gmk index 951a18de90acf1106e18afec4949591bfcd6a054..1b7aaa8ae201f6896b2da8f1d12e5ea887ee740b 100644 --- a/make/common/Defs-macosx.gmk +++ b/make/common/Defs-macosx.gmk @@ -406,10 +406,16 @@ endif 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) diff --git a/make/common/shared/Compiler-msvc.gmk b/make/common/shared/Compiler-msvc.gmk index c50706c5fbd6c86b59a968bcadc37530d08121f1..af7dd101f7ca247ec6cd0a66a224762ef5044313 100644 --- a/make/common/shared/Compiler-msvc.gmk +++ b/make/common/shared/Compiler-msvc.gmk @@ -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 @@ ifeq ($(PLATFORM), windows) 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 @@ ifeq ($(PLATFORM), windows) SHARED_LIBRARY_FLAG = -LD # RSC is always same as RC (Not sure who uses this RSC variable) RSC = $(RC) - +endif endif diff --git a/make/common/shared/Defs-utils.gmk b/make/common/shared/Defs-utils.gmk index 2d3104ddcbbba3923cb7c06e75520ef833129717..3bc0c6f4dc2bcdc048a2ec69cefc6a4163de1ea5 100644 --- a/make/common/shared/Defs-utils.gmk +++ b/make/common/shared/Defs-utils.gmk @@ -74,22 +74,24 @@ ifeq ($(PLATFORM),macosx) 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 diff --git a/makefiles/Images.gmk b/makefiles/Images.gmk index 28322675559a05e3ebf711f091d20510b691d967..bb737f88878e31b86e134696e2733a16bb6f9df9 100644 --- a/makefiles/Images.gmk +++ b/makefiles/Images.gmk @@ -59,7 +59,7 @@ define process-doc-file $(ECHO) $(LOG_INFO) Processing $(patsubst $(OUTPUT_ROOT)/%,%,$@) $(MKDIR) -p $(@D) $(RM) $@ - $(SED) 's/$$//g' $< > $@ + LC_ALL=C $(SED) 's/$$//g' $< > $@ $(CHMOD) 444 $@ endef