Browse Source

* android: Generate PIC executables. It is required for Android 5.0+.

git-svn-id: trunk@32023 -
yury 9 years ago
parent
commit
4026cfcf60
1 changed files with 2 additions and 0 deletions
  1. 2 0
      compiler/systems/t_android.pas

+ 2 - 0
compiler/systems/t_android.pas

@@ -328,6 +328,8 @@ begin
     Message1(exec_i_linking, outname);
     Message1(exec_i_linking, outname);
 
 
   opts:='';
   opts:='';
+  if not IsSharedLib and (cs_create_pic in current_settings.moduleswitches) then
+    opts:=opts + ' --pic-executable';
   if (cs_link_strip in current_settings.globalswitches) and
   if (cs_link_strip in current_settings.globalswitches) and
      not (cs_link_separate_dbg_file in current_settings.globalswitches) then
      not (cs_link_separate_dbg_file in current_settings.globalswitches) then
     opts:=opts + ' -s';
     opts:=opts + ' -s';