[Mesa-dev] [PATCH 3/6] Android: Fix building secondary arch in mixed 32/64-bit builds

Rob Herring robh at kernel.org
Fri Jan 29 10:52:25 PST 2016


At least in Android M, using LOCAL_CC does not work for secondary arch
when doing dual arch builds. Use LOCAL_CLFAGS and LOCAL_CONLYFLAGS
instead.

Cc: Emil Velikov <emil.l.velikov at gmail.com>
Cc: Chih-Wei Huang <cwhuang at android-x86.org>
Signed-off-by: Rob Herring <robh at kernel.org>
---
 Android.common.mk | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/Android.common.mk b/Android.common.mk
index 948561c..c882209 100644
--- a/Android.common.mk
+++ b/Android.common.mk
@@ -22,12 +22,8 @@
 # DEALINGS IN THE SOFTWARE.
 
 # use c99 compiler by default
-ifeq ($(LOCAL_CC),)
 ifeq ($(LOCAL_IS_HOST_MODULE),true)
-LOCAL_CC := $(HOST_CC) -std=c99 -D_GNU_SOURCE
-else
-LOCAL_CC := $(TARGET_CC) -std=c99
-endif
+LOCAL_CFLAGS += -D_GNU_SOURCE
 endif
 
 LOCAL_C_INCLUDES += \
@@ -60,6 +56,9 @@ LOCAL_CFLAGS += \
 	-fvisibility=hidden \
 	-Wno-sign-compare
 
+LOCAL_CONLYFLAGS += \
+	-std=c99
+
 ifeq ($(strip $(MESA_ENABLE_ASM)),true)
 ifeq ($(TARGET_ARCH),x86)
 LOCAL_CFLAGS += \
-- 
2.5.0



More information about the mesa-dev mailing list