Browse Source

* Use standard Android NDK prefixes for binutils by default.

git-svn-id: trunk@23608 -
yury 12 years ago
parent
commit
b3862eb4b1
4 changed files with 210 additions and 169 deletions
  1. 10 0
      compiler/options.pas
  2. 179 169
      utils/fpcm/fpcmake.inc
  3. 16 0
      utils/fpcm/fpcmake.ini
  4. 5 0
      utils/fpcmkcfg/fpc.cft

+ 10 - 0
compiler/options.pas

@@ -2960,6 +2960,16 @@ begin
   def_system_macro('FPC_LOCALS_ARE_STACK_REG_RELATIVE');
 {$endif}
 
+  { Set up a default prefix for binutils when cross-compiling }
+  if source_info.system<>target_info.system then
+    case target_info.system of
+      { Use standard Android NDK prefixes }
+      system_arm_android:
+        utilsprefix:='arm-linux-androideabi-';
+      system_i386_android:
+        utilsprefix:='i686-linux-android-';
+    end;
+
   { read configuration file }
   if (not disable_configfile) and
      (ppccfg<>'') then

File diff suppressed because it is too large
+ 179 - 169
utils/fpcm/fpcmake.inc


+ 16 - 0
utils/fpcm/fpcmake.ini

@@ -435,6 +435,22 @@ ifdef CROSSCOMPILE
 ifndef DARWIN2DARWIN
 ifneq ($(CPU_TARGET),jvm)
 BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
+
+# For Android use standard NDK prefixes
+ifeq ($(OS_TARGET),android)
+ifeq ($(CPU_TARGET),arm)
+BINUTILSPREFIX=arm-linux-androideabi-
+else
+ifeq ($(CPU_TARGET),i386)
+BINUTILSPREFIX=i686-linux-android-
+else
+ifeq ($(CPU_TARGET),mips)
+BINUTILSPREFIX=mipsel-linux-android-
+endif
+endif
+endif
+endif
+
 endif
 endif
 endif

+ 5 - 0
utils/fpcmkcfg/fpc.cft

@@ -177,6 +177,11 @@
 #undef NEEDCROSSBINUTILS
 #endif
 
+# for android cross-prefix is set by compiler
+#ifdef android
+#undef NEEDCROSSBINUTILS
+#endif
+
 # binutils prefix for cross compiling
 #IFDEF FPC_CROSSCOMPILING
 #IFDEF NEEDCROSSBINUTILS

Some files were not shown because too many files changed in this diff