Skip to content

Commit

Permalink
android: note for android 4.0- and '-pie' linker option
Browse files Browse the repository at this point in the history
  For android 4.0-, user will need to pass in '-Wl -no-pie'
  to override the default.

  On android 4.1+ -pie is accepted, and on android 5.0+
  is required.  For android 4.0- this will probably link
  but then segfault when executed on the device.
  • Loading branch information
jayrm committed Jan 6, 2024
1 parent 1fdf88a commit 3cfefa6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/compiler/fbc.bas
Expand Up @@ -1021,6 +1021,12 @@ private function hLinkFiles( ) as integer

if( fbGetOption( FB_COMPOPT_PIC ) ) then
if( fbGetOption( FB_COMPOPT_OUTTYPE ) = FB_OUTTYPE_EXECUTABLE ) then
'' NOTE: For android 4.0-, user will need to pass in '-Wl -no-pie'
'' to override this default.
'' On android 4.1+ this is accepted, and on android 5.0+
'' is required. For android 4.0- this will probably link
'' but then segfault when executed on the device.

ldcline += " -pie"
else
'' Dynamic library: no flag needed
Expand Down

0 comments on commit 3cfefa6

Please sign in to comment.