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: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
LOCAL_CFLAGS += \
-DENABLE_SHADER_CACHE \
- -D__STDC_LIMIT_MACROS \
-DHAVE___BUILTIN_EXPECT \
-DHAVE___BUILTIN_FFS \
-DHAVE___BUILTIN_FFSLL \
-fvisibility=hidden \
-Wno-sign-compare
+LOCAL_CPPFLAGS += \
+ -D__STDC_CONSTANT_MACROS \
+ -D__STDC_FORMAT_MACROS \
+ -D__STDC_LIMIT_MACROS
+
# mesa requires at least c99 compiler
LOCAL_CONLYFLAGS += \
-std=c99
ifeq ($(MESA_ENABLE_LLVM),true)
LOCAL_CFLAGS += \
- -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2 \
- -D__STDC_CONSTANT_MACROS \
- -D__STDC_FORMAT_MACROS \
- -D__STDC_LIMIT_MACROS
+ -DHAVE_LLVM=0x0305 -DMESA_LLVM_VERSION_PATCH=2
endif
ifneq ($(LOCAL_IS_HOST_MODULE),true)