summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKoushik Dutta <koushd@gmail.com>2013-07-10 19:01:08 (GMT)
committerKoushik Dutta <koushd@gmail.com>2013-07-10 19:01:35 (GMT)
commite5bdddf18ce2b28d4b9ced32413f54d96840e01e (patch)
tree60d064864368654ab0c0b26e79c518ba71b02a9e
parent3fb440ac788d755237c083023b0d68ca3ec43869 (diff)
downloadbuild-e5bdddf18ce2b28d4b9ced32413f54d96840e01e.zip
build-e5bdddf18ce2b28d4b9ced32413f54d96840e01e.tar.gz
build-e5bdddf18ce2b28d4b9ced32413f54d96840e01e.tar.bz2
Fixes for Xcode 5 and OSX 10.9.
kernel.mk: Put elf.h into the include path on Darwin builds. Change-Id: I7069b956965d27caac3b2e4c3cc2e8b4c1da7a82
-rw-r--r--core/combo/HOST_darwin-x86.mk7
-rw-r--r--core/tasks/kernel.mk14
2 files changed, 15 insertions, 6 deletions
diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk
index aadee19..78261b6 100644
--- a/core/combo/HOST_darwin-x86.mk
+++ b/core/combo/HOST_darwin-x86.mk
@@ -38,7 +38,7 @@ build_mac_version := $(shell sw_vers -productVersion)
ifneq ($(strip $(BUILD_MAC_SDK_EXPERIMENTAL)),)
# SDK 10.7 and higher is not fully compatible with Android.
-mac_sdk_versions_supported := 10.7 10.8
+mac_sdk_versions_supported := 10.9 10.7 10.8
else
mac_sdk_versions_supported := 10.6
endif # BUILD_MAC_SDK_EXPERIMENTAL
@@ -76,6 +76,11 @@ HOST_GLOBAL_LDFLAGS += -isysroot $(mac_sdk_root) -Wl,-syslibroot,$(mac_sdk_root)
HOST_GLOBAL_CFLAGS += -fPIC -funwind-tables
HOST_NO_UNDEFINED_LDFLAGS := -Wl,-undefined,error
+ifeq ($(mac_sdk_version),10.9)
+HOST_GLOBAL_CFLAGS += -I$(mac_sdk_root)/usr/include/c++/4.2.1 -arch i386 -Wno-nested-anon-types -Wno-unused-parameter
+HOST_GLOBAL_LDFLAGS += -Wl,-arch,i386,-lstdc++
+endif
+
HOST_CC := gcc
HOST_CXX := g++
HOST_AR := $(AR)
diff --git a/core/tasks/kernel.mk b/core/tasks/kernel.mk
index a6942ca..dc51e7c 100644
--- a/core/tasks/kernel.mk
+++ b/core/tasks/kernel.mk
@@ -146,6 +146,10 @@ ifeq ($(TARGET_ARCH),arm)
ccache =
endif
+ifeq ($(HOST_OS),darwin)
+ MAKE_FLAGS := C_INCLUDE_PATH=$(ANDROID_BUILD_TOP)/external/elfutils/libelf
+endif
+
ifeq ($(TARGET_KERNEL_MODULES),)
TARGET_KERNEL_MODULES := no-external-modules
endif
@@ -155,15 +159,15 @@ $(KERNEL_OUT):
mkdir -p $(KERNEL_MODULES_OUT)
$(KERNEL_CONFIG): $(KERNEL_OUT)
- $(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG)
+ $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) VARIANT_DEFCONFIG=$(VARIANT_DEFCONFIG) SELINUX_DEFCONFIG=$(SELINUX_DEFCONFIG) $(KERNEL_DEFCONFIG)
$(KERNEL_OUT)/piggy : $(TARGET_PREBUILT_INT_KERNEL)
$(hide) gunzip -c $(KERNEL_OUT)/arch/$(TARGET_ARCH)/boot/compressed/piggy.gzip > $(KERNEL_OUT)/piggy
TARGET_KERNEL_BINARIES: $(KERNEL_OUT) $(KERNEL_CONFIG) $(KERNEL_HEADERS_INSTALL)
- $(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) $(TARGET_PREBUILT_INT_KERNEL_TYPE)
- -$(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) modules
- -$(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) INSTALL_MOD_PATH=../../$(KERNEL_MODULES_INSTALL) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) modules_install
+ $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) $(TARGET_PREBUILT_INT_KERNEL_TYPE)
+ -$(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) modules
+ -$(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) INSTALL_MOD_PATH=../../$(KERNEL_MODULES_INSTALL) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) modules_install
$(mv-modules)
$(clean-module-folder)
@@ -174,7 +178,7 @@ $(TARGET_PREBUILT_INT_KERNEL): $(TARGET_KERNEL_MODULES)
$(clean-module-folder)
$(KERNEL_HEADERS_INSTALL): $(KERNEL_OUT) $(KERNEL_CONFIG)
- $(MAKE) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) headers_install
+ $(MAKE) $(MAKE_FLAGS) -C $(KERNEL_SRC) O=$(KERNEL_OUT) ARCH=$(TARGET_ARCH) $(ARM_CROSS_COMPILE) headers_install
endif # FULL_KERNEL_BUILD