For use with Installing_on_Android

The Android toolchain is a little complicated so I used http://plausible.org/andy/agcc to simplify the process. Here is my patch against that script:

--- agcc.old    2011-01-23 19:47:49.000000000 -0700
+++ agcc        2011-01-29 15:43:58.000000000 -0700
@@ -39,7 +39,10 @@
 my $DROID = $1;
 
 my $ALIB = "$DROID/out/target/product/generic/obj/lib";
-my $TOOLCHAIN = "$DROID/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1";
+my $TOOLCHAIN = "$DROID/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0";
+
+print STDERR "ALIB ........ $ALIB\n";
+print STDERR "TOOLCHAIN ... $TOOLCHAIN\n";
 
 my @include_paths = (
     "-I$DROID/system/core/include",
@@ -85,6 +88,7 @@
     "-mthumb-interwork",
     "-fpic",
     "-fno-exceptions",
+    "-fno-short-enums", # See www for why we added this
     "-ffunction-sections",
     "-funwind-tables", # static exception-like tables
     "-fstack-protector", # check guard variable before return
@@ -114,7 +118,7 @@
     "-nostdlib",
     "$ALIB/crtend_android.o",
     "$ALIB/crtbegin_dynamic.o",
-    "$TOOLCHAIN/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a",
+    "$TOOLCHAIN/lib/gcc/arm-eabi/4.4.0/interwork/libgcc.a",
     "-lc",
     "-lm");
     
@@ -129,7 +133,7 @@
     "-lc",
     "-lm",
     "-Wl,--no-undefined",
-    "$TOOLCHAIN/lib/gcc/arm-eabi/4.2.1/interwork/libgcc.a",
+    "$TOOLCHAIN/lib/gcc/arm-eabi/4.4.0/interwork/libgcc.a",
     "-Wl,--whole-archive"); # .a, .o input files go *after* here
 
 # Now implement a quick parser for a gcc-like command line

AndroidAgcc (last edited 2011-01-30 04:26:04 by MattAdams)