From d51d2aaad01d1c8188193a7913c6ef0fc38ea798 Mon Sep 17 00:00:00 2001 From: Edwin Vane Date: Mon, 30 Jan 2012 15:26:35 -0500 Subject: Changes to make gluegen build with NDK r7 - A bug in cpptasks was getting in the way of a working build with NDK r7. A local patch to cpptasks fixed the bug. - The patch is added as make/lib/cpptasks_gcclinker.patch and applies cleanly to cpptasts @ revision 177. - The result of building cpptasks r177 with this patch is part of the commit as well. - Cleaned up and simplified the android cross-compile script in make/scripts. - Cleaned up arguments passed to gcc for compiling and linking to look more like the command lines used for building NDK samples. - Some differences are necessary as cpptasks won't let us specify any binary other than 'gcc' for building. See gluegen-cpptasks-android-armv7.xml for comments on the matter. - Thinking forward to x86 support, generalized jogamp-androidtasks.xml to install the gluegen shared library in a subdirectory of image/lib named for the targetted ABI for packaging with aapt. This file is no-longer ARM-specific. --- make/lib/cpptasks.jar | Bin 362952 -> 365028 bytes make/lib/cpptasks_gcclinker.patch | 17 ++++++++ make/lib/gluegen-cpptasks-android-armv7.xml | 62 +++++++++++++--------------- 3 files changed, 46 insertions(+), 33 deletions(-) create mode 100644 make/lib/cpptasks_gcclinker.patch (limited to 'make/lib') diff --git a/make/lib/cpptasks.jar b/make/lib/cpptasks.jar index f91bdc8..45085b5 100644 Binary files a/make/lib/cpptasks.jar and b/make/lib/cpptasks.jar differ diff --git a/make/lib/cpptasks_gcclinker.patch b/make/lib/cpptasks_gcclinker.patch new file mode 100644 index 0000000..0eb4c76 --- /dev/null +++ b/make/lib/cpptasks_gcclinker.patch @@ -0,0 +1,17 @@ +Index: src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java +=================================================================== +--- src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java (revision 177) ++++ src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java (working copy) +@@ -78,6 +78,12 @@ + */ + public String decorateLinkerOption(StringBuffer buf, String arg) { + String decoratedArg = arg; ++ if (arg.startsWith("--sysroot")) { ++ return arg; ++ } ++ if (arg.startsWith("-nostdlib")) { ++ return arg; ++ } + if (arg.length() > 1 && arg.charAt(0) == '-') { + switch (arg.charAt(1)) { + // diff --git a/make/lib/gluegen-cpptasks-android-armv7.xml b/make/lib/gluegen-cpptasks-android-armv7.xml index e96036a..7d80860 100644 --- a/make/lib/gluegen-cpptasks-android-armv7.xml +++ b/make/lib/gluegen-cpptasks-android-armv7.xml @@ -11,7 +11,7 @@ In case you want to compile for 32bit on a 64bit machine, you might also need to set the 'os.arch' to 'x86'. Example: gluegen/make/make.gluegen.all.linux-x86.sh - --> + --> @@ -19,32 +19,35 @@ - - - - - - + + + + - + + + - + + + + + + - - - - - + - @@ -56,25 +59,18 @@ - - - - - - - - - - - - - - - - - - + + + + + + + -- cgit v1.2.3