Mac build fixes.

This gets us pretty close. There are a few problems with libraries we depend
on (system/core/liblog and external/icu4c) that I have workarounds for, and
a problem with gtest that I haven't yet worked around that prevents us from
linking any of the tests. But this at least gives us a Mac dex2oat binary.

Change-Id: Iac39a6c2963c3d37ab2165d7d1a70e303ba22c45
diff --git a/build/Android.common.mk b/build/Android.common.mk
index 9e05a1c..671ed59 100644
--- a/build/Android.common.mk
+++ b/build/Android.common.mk
@@ -68,7 +68,13 @@
 ART_TARGET_NON_DEBUG_CFLAGS := $(art_non_debug_cflags)
 
 # TODO: move -fkeep-inline-functions to art_debug_cflags when target gcc > 4.4
-ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags) -fkeep-inline-functions
+ART_HOST_DEBUG_CFLAGS := $(art_debug_cflags)
+
+ifneq ($(HOST_OS),linux)
+  # Some Mac OS pthread header files are broken with -fkeep-inline-functions.
+  ART_HOST_DEBUG_CFLAGS := $(filter-out -fkeep-inline-functions,)
+endif
+
 ART_TARGET_DEBUG_CFLAGS := $(art_debug_cflags)
 
 DEX2OAT_SRC_FILES := \