From 3cfefa6694b3e5e7bc5f02ba03d8931b5dd95f24 Mon Sep 17 00:00:00 2001 From: Jeff Marshall Date: Sat, 6 Jan 2024 11:16:12 -0500 Subject: [PATCH] android: note for android 4.0- and '-pie' linker option 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. --- src/compiler/fbc.bas | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/compiler/fbc.bas b/src/compiler/fbc.bas index 43631fc76..eb2cc1eae 100644 --- a/src/compiler/fbc.bas +++ b/src/compiler/fbc.bas @@ -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