Commit 13e2928d authored by Emil Velikov's avatar Emil Velikov Committed by Emil Velikov

android: always set __STDC_*_MACROS for C++ sources

Various parts of the code depend on the macros being defined.

Just set those unconditionally, only where needed (c++ sources) so that
we can drop the workarounds through the code.

Cc: Rob Herring <robh@kernel.org>
Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Signed-off-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom's avatarEric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca's avatarJose Fonseca <jfonseca@vmware.com>
parent c4862fa3
...@@ -44,7 +44,6 @@ LOCAL_CFLAGS += \ ...@@ -44,7 +44,6 @@ LOCAL_CFLAGS += \
LOCAL_CFLAGS += \ LOCAL_CFLAGS += \
-DENABLE_SHADER_CACHE \ -DENABLE_SHADER_CACHE \
-D__STDC_LIMIT_MACROS \
-DHAVE___BUILTIN_EXPECT \ -DHAVE___BUILTIN_EXPECT \
-DHAVE___BUILTIN_FFS \ -DHAVE___BUILTIN_FFS \
-DHAVE___BUILTIN_FFSLL \ -DHAVE___BUILTIN_FFSLL \
...@@ -64,6 +63,11 @@ LOCAL_CFLAGS += \ ...@@ -64,6 +63,11 @@ LOCAL_CFLAGS += \
-fvisibility=hidden \ -fvisibility=hidden \
-Wno-sign-compare -Wno-sign-compare
LOCAL_CPPFLAGS += \
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
-D__STDC_LIMIT_MACROS
# mesa requires at least c99 compiler # mesa requires at least c99 compiler
LOCAL_CONLYFLAGS += \ LOCAL_CONLYFLAGS += \
-std=c99 -std=c99
...@@ -78,10 +82,7 @@ endif ...@@ -78,10 +82,7 @@ endif
ifeq ($(MESA_ENABLE_LLVM),true) ifeq ($(MESA_ENABLE_LLVM),true)
LOCAL_CFLAGS += \ LOCAL_CFLAGS += \
-DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \ -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
-D__STDC_CONSTANT_MACROS \
-D__STDC_FORMAT_MACROS \
-D__STDC_LIMIT_MACROS
endif endif
ifneq ($(LOCAL_IS_HOST_MODULE),true) ifneq ($(LOCAL_IS_HOST_MODULE),true)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment