From: Pyry Haulos Date: Tue, 28 Oct 2014 23:50:11 +0000 (-0700) Subject: Make r10c toolchain compile flags more Android-ish X-Git-Tag: upstream/0.1.0~2096^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2002f4368917f738fbd0c8242515146599b442ea;p=platform%2Fupstream%2FVK-GL-CTS.git Make r10c toolchain compile flags more Android-ish * Use -mandroid when building C/C++. * Enable exceptions and RTTI explicitly as -mandroid implies -fno-rtti and -fno-exceptions. * Remove redundant -DANDROID and -D__ANDROID__ defines. Change-Id: I6c6c548e5e0082f369efcd1970d082ec73d67732 --- diff --git a/framework/delibs/cmake/toolchain-android-r10c.cmake b/framework/delibs/cmake/toolchain-android-r10c.cmake index fe48832..739c276 100644 --- a/framework/delibs/cmake/toolchain-android-r10c.cmake +++ b/framework/delibs/cmake/toolchain-android-r10c.cmake @@ -31,7 +31,8 @@ if (NOT DEFINED DE_ANDROID_API) set(DE_ANDROID_API 9) endif () -set(COMMON_C_FLAGS "-fpic -DANDROID -D__ANDROID__ -D__STDC_INT64__") +set(COMMON_C_FLAGS "-mandroid -D__STDC_INT64__") +set(COMMON_CXX_FLAGS "${COMMON_C_FLAGS} -frtti -fexceptions") set(COMMON_LINKER_FLAGS "") set(ARM_C_FLAGS "-D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_ARCH_5TE__ ") @@ -140,6 +141,6 @@ set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) # \note Without CACHE STRING FORCE cmake ignores these. set(CMAKE_C_FLAGS "--sysroot=${ANDROID_SYSROOT} ${COMMON_C_FLAGS} ${TARGET_C_FLAGS}" CACHE STRING "" FORCE) -set(CMAKE_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT} ${COMMON_C_FLAGS} ${TARGET_C_FLAGS} -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/include -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ANDROID_ABI}/include" CACHE STRING "" FORCE) +set(CMAKE_CXX_FLAGS "--sysroot=${ANDROID_SYSROOT} ${COMMON_CXX_FLAGS} ${TARGET_C_FLAGS} -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/include -I${ANDROID_NDK_PATH}/sources/cxx-stl/gnu-libstdc++/4.9/libs/${ANDROID_ABI}/include" CACHE STRING "" FORCE) set(CMAKE_SHARED_LINKER_FLAGS "-nostdlib -Wl,-shared,-Bsymbolic -Wl,--no-undefined ${COMMON_LINKER_FLAGS} ${TARGET_LINKER_FLAGS}" CACHE STRING "" FORCE) set(CMAKE_EXE_LINKER_FLAGS "${COMMON_LINKER_FLAGS} ${TARGET_LINKER_FLAGS}" CACHE STRING "" FORCE)