Skip to content

Commit e99d3df

Browse files
committed
aarch64 support for -fpic
1 parent 41553af commit e99d3df

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

aarch64/extractionMachdep.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Extract Constant Archi.abi =>
3030
Extract Constant SelectOp.symbol_is_relocatable =>
3131
"match Configuration.system with
3232
| ""macos"" -> C2C.atom_is_external
33-
| _ -> (fun _ -> false)".
33+
| _ -> C2C.atom_needs_GOT_access".
3434

3535
(* Asm *)
3636

configure

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,9 @@ if test "$arch" = "aarch64"; then
419419
linux)
420420
abi="standard"
421421
cprepro_options="-U__GNUC__ -E"
422-
system="linux";;
422+
system="linux"
423+
pic_supported=true
424+
;;
423425
macos|macosx)
424426
abi="apple"
425427
casm="${toolprefix}cc"
@@ -430,7 +432,9 @@ if test "$arch" = "aarch64"; then
430432
cprepro="${toolprefix}cc"
431433
cprepro_options="-arch arm64 -U__GNUC__ -U__clang__ -U__BLOCKS__ '-D__attribute__(x)=' '-D__asm(x)=' '-D_Nullable=' '-D_Nonnull=' '-D__DARWIN_OS_INLINE=static inline' -Wno-\\#warnings -E"
432434
libmath=""
433-
system="macos";;
435+
system="macos"
436+
pic_supported=true
437+
;;
434438
*)
435439
echo "Error: invalid eabi/system '$target' for architecture AArch64." 1>&2
436440
echo "$usage" 1>&2

tools/runner.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,14 @@ case "$target,$os" in
181181
aarch64,linux)
182182
case "$1" in
183183
1) Run_test "$simu_aarch64" "";;
184-
2) Run_test "$simu_aarch64" "-Os";;
184+
2) Run_test "$simu_aarch64" "-fpic";;
185+
3) Run_test "$simu_aarch64" "-Os";;
185186
esac;;
186187
aarch64,macos)
187188
case "$1" in
188189
1) Run_test "" "";;
189-
2) Run_test "" "-Os";;
190+
2) Run_test "" "-fpic";;
191+
3) Run_test "" "-Os";;
190192
esac;;
191193
arm,linux)
192194
case "$1" in

0 commit comments

Comments
 (0)