From 61e5059ef768388db01232c61879d2ba3e0c1d47 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Wed, 29 Jan 2014 13:09:30 -0800 Subject: [PATCH] Fix the host inttypes.h problem globally. Bug: 12708004 Change-Id: I2c75647bac304b82e150c540b9e6c5568997596d --- core/combo/HOST_darwin-x86.mk | 4 ++++ core/combo/HOST_linux-x86.mk | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/core/combo/HOST_darwin-x86.mk b/core/combo/HOST_darwin-x86.mk index ba61cbfe96..33289ac3a1 100644 --- a/core/combo/HOST_darwin-x86.mk +++ b/core/combo/HOST_darwin-x86.mk @@ -34,6 +34,10 @@ ifneq ($(strip $(BUILD_HOST_static)),) HOST_GLOBAL_LDFLAGS += -static endif # BUILD_HOST_static +# Workaround differences in inttypes.h between host and target. +# See bug 12708004. +HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS + build_mac_version := $(shell sw_vers -productVersion) mac_sdk_versions_supported := 10.6 10.7 10.8 diff --git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk index 578cd421fd..3d03ed6eb7 100644 --- a/core/combo/HOST_linux-x86.mk +++ b/core/combo/HOST_linux-x86.mk @@ -58,4 +58,8 @@ HOST_GLOBAL_CFLAGS += -fPIC \ # Disable new longjmp in glibc 2.11 and later. See bug 2967937. HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 +# Workaround differences in inttypes.h between host and target. +# See bug 12708004. +HOST_GLOBAL_CFLAGS += -D__STDC_FORMAT_MACROS + HOST_NO_UNDEFINED_LDFLAGS := -Wl,--no-undefined