Merge "Use gnu++11 and gnu99 explicitly for C++/C files."
This commit is contained in:
commit
32c0c6e7d5
@ -609,6 +609,14 @@ libc_crt_target_cflags += \
|
|||||||
-I$(LOCAL_PATH)/include \
|
-I$(LOCAL_PATH)/include \
|
||||||
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
|
-DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION)
|
||||||
|
|
||||||
|
# Define some common conlyflags
|
||||||
|
libc_common_conlyflags := \
|
||||||
|
-std=gnu99
|
||||||
|
|
||||||
|
# Define some common cppflags
|
||||||
|
libc_common_cppflags := \
|
||||||
|
-std=gnu++11
|
||||||
|
|
||||||
# Define some common includes
|
# Define some common includes
|
||||||
# ========================================================
|
# ========================================================
|
||||||
libc_common_c_includes := \
|
libc_common_c_includes := \
|
||||||
@ -756,6 +764,8 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
|
LOCAL_SRC_FILES := bionic/__stack_chk_fail.cpp
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
|
LOCAL_CFLAGS := $(libc_common_cflags) -fno-stack-protector -Werror
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libbionic_ssp
|
LOCAL_MODULE := libbionic_ssp
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -773,11 +783,12 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_SRC_FILES := $(libc_tzcode_src_files)
|
LOCAL_SRC_FILES := $(libc_tzcode_src_files)
|
||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
$(libc_common_cflags) \
|
$(libc_common_cflags) \
|
||||||
-std=gnu99 \
|
|
||||||
-DSTD_INSPIRED=1 \
|
-DSTD_INSPIRED=1 \
|
||||||
-DTZDIR=\"/system/usr/share/zoneinfo\" \
|
-DTZDIR=\"/system/usr/share/zoneinfo\" \
|
||||||
-DTM_GMTOFF=tm_gmtoff \
|
-DTM_GMTOFF=tm_gmtoff \
|
||||||
-DUSG_COMPAT=1
|
-DUSG_COMPAT=1
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc_tzcode
|
LOCAL_MODULE := libc_tzcode
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -801,6 +812,8 @@ LOCAL_CFLAGS := \
|
|||||||
-I$(LOCAL_PATH)/upstream-freebsd \
|
-I$(LOCAL_PATH)/upstream-freebsd \
|
||||||
-I$(LOCAL_PATH)/upstream-freebsd/libc/include \
|
-I$(LOCAL_PATH)/upstream-freebsd/libc/include \
|
||||||
-include upstream-freebsd/freebsd-compat.h
|
-include upstream-freebsd/freebsd-compat.h
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc_freebsd
|
LOCAL_MODULE := libc_freebsd
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -824,6 +837,8 @@ LOCAL_CFLAGS := \
|
|||||||
-I$(LOCAL_PATH)/upstream-netbsd \
|
-I$(LOCAL_PATH)/upstream-netbsd \
|
||||||
-I$(LOCAL_PATH)/upstream-netbsd/libc/include \
|
-I$(LOCAL_PATH)/upstream-netbsd/libc/include \
|
||||||
-include upstream-netbsd/netbsd-compat.h
|
-include upstream-netbsd/netbsd-compat.h
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc_netbsd
|
LOCAL_MODULE := libc_netbsd
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -840,6 +855,8 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_SRC_FILES := $(libc_bionic_src_files)
|
LOCAL_SRC_FILES := $(libc_bionic_src_files)
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) -Werror
|
LOCAL_CFLAGS := $(libc_common_cflags) -Werror
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc_bionic
|
LOCAL_MODULE := libc_bionic
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -856,8 +873,9 @@ include $(CLEAR_VARS)
|
|||||||
|
|
||||||
LOCAL_SRC_FILES := $(libc_common_src_files)
|
LOCAL_SRC_FILES := $(libc_common_src_files)
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) \
|
LOCAL_CFLAGS := $(libc_common_cflags) \
|
||||||
-std=gnu99 \
|
|
||||||
-I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers
|
-I$(LOCAL_PATH)/upstream-netbsd/libc/include # for netbsd private headers
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc_common
|
LOCAL_MODULE := libc_common
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -894,8 +912,9 @@ LOCAL_SRC_FILES := \
|
|||||||
|
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) \
|
LOCAL_CFLAGS := $(libc_common_cflags) \
|
||||||
-DLIBC_STATIC \
|
-DLIBC_STATIC
|
||||||
-std=gnu99
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
|
|
||||||
LOCAL_MODULE := libc_nomalloc
|
LOCAL_MODULE := libc_nomalloc
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -918,8 +937,9 @@ LOCAL_SRC_FILES := \
|
|||||||
bionic/libc_init_static.cpp
|
bionic/libc_init_static.cpp
|
||||||
|
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) \
|
LOCAL_CFLAGS := $(libc_common_cflags) \
|
||||||
-DLIBC_STATIC \
|
-DLIBC_STATIC
|
||||||
-std=gnu99
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
LOCAL_MODULE := libc
|
LOCAL_MODULE := libc
|
||||||
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
|
||||||
@ -940,7 +960,9 @@ include $(CLEAR_VARS)
|
|||||||
# Since this code is experimental it is disabled by default.
|
# Since this code is experimental it is disabled by default.
|
||||||
# see libc/bionic/pthread_debug.c for details
|
# see libc/bionic/pthread_debug.c for details
|
||||||
|
|
||||||
LOCAL_CFLAGS := $(libc_common_cflags) -std=gnu99 -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
|
LOCAL_CFLAGS := $(libc_common_cflags) -DPTHREAD_DEBUG -DPTHREAD_DEBUG_ENABLED=0
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
|
|
||||||
LOCAL_SRC_FILES := \
|
LOCAL_SRC_FILES := \
|
||||||
@ -997,6 +1019,8 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
$(libc_common_cflags) \
|
$(libc_common_cflags) \
|
||||||
-DMALLOC_LEAK_CHECK
|
-DMALLOC_LEAK_CHECK
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
|
|
||||||
@ -1028,6 +1052,8 @@ include $(CLEAR_VARS)
|
|||||||
LOCAL_CFLAGS := \
|
LOCAL_CFLAGS := \
|
||||||
$(libc_common_cflags) \
|
$(libc_common_cflags) \
|
||||||
-DMALLOC_QEMU_INSTRUMENT
|
-DMALLOC_QEMU_INSTRUMENT
|
||||||
|
LOCAL_CONLYFLAGS := $(libc_common_conlyflags)
|
||||||
|
LOCAL_CPPFLAGS := $(libc_common_cppflags)
|
||||||
|
|
||||||
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
LOCAL_C_INCLUDES := $(libc_common_c_includes)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user