changeset 4175:c1c41fb9dca8

Android: Set sysroot in gcc.
author tb115823 <Tomas.Brandalik@oracle.com>
date Thu, 04 Jul 2013 10:12:28 +0200
parents 0bf0d9dafcc7
children 3c6268833424
files buildSrc/android.gradle
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/buildSrc/android.gradle	Thu Jul 04 07:29:42 2013 +0400
+++ b/buildSrc/android.gradle	Thu Jul 04 10:12:28 2013 +0200
@@ -233,10 +233,10 @@
 android.use.egl=true
 android.com.sun.javafx.isEmbedded=true
 """
-
+def sysroot = "${ANDROID_NDK}/platforms/${ANDROID_NDK_TARGET}/arch-arm"
 ANDROID.library = { name -> return "lib${name}.so" as String }
 
-def ccFlags = ["-std=c99", "-DANDROID", "-c", "-nostdlib", "-DANDROID_NDK"]
+def ccFlags = ["--sysroot=$sysroot","-std=c99", "-DANDROID", "-c", "-nostdlib", "-DANDROID_NDK"]
 def ccOptFlags = ["-fpic", "-ffunction-sections", "-funwind-tables","-fstack-protector",
                   "-Os", "-O2", "-fno-strict-aliasing", "-finline-limit=64", "-fomit-frame-pointer"]
 def ccWarnFlags = ["-Wa,--noexecstack", "-Wno-psabi"]
@@ -245,7 +245,7 @@
 def ccDebugFlags = [IS_DEBUG ? "-DDEBUG" : "-DNDEBUG"]
 def ccDefaultIncludeFlags = ["-I${ANDROID_NDK}/platforms/${ANDROID_NDK_TARGET}/arch-arm/usr/include"]
 
-def linkFlags = ["--sysroot=${ANDROID_NDK}/platforms/${ANDROID_NDK_TARGET}/arch-arm",
+def linkFlags = ["--sysroot=$sysroot",
                  "-Wl,--no-undefined", "-Wl,-z,noexecstack", "-lc", "-lm", "-shared",
                  "-L${ANDROID_NDK}/platforms/${ANDROID_NDK_TARGET}/arch-arm/usr/lib"]