From 3498d78aade7305252fb4b6ddedf43ea7886578d Mon Sep 17 00:00:00 2001 From: florian Date: Sun, 12 Apr 2020 18:05:49 +0000 Subject: [PATCH] * make eabihf/eabi changeable at compilation time git-svn-id: trunk@44706 - (cherry picked from commit 9d7261a60bb2e6c13ba096eecf630933a779a43d) --- compiler/systems.pas | 4 ++-- compiler/systems/t_linux.pas | 16 ++++++++++------ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/compiler/systems.pas b/compiler/systems.pas index 7d8317cd68..5a24c1dabc 100644 --- a/compiler/systems.pas +++ b/compiler/systems.pas @@ -420,9 +420,9 @@ interface (name: 'AIX' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}), (name: 'DARWIN' ; supported:{$if defined(powerpc) or defined(powerpc64)}true{$else}false{$endif}), (name: 'ELFV2' ; supported:{$if defined(powerpc64)}true{$else}false{$endif}), - (name: 'EABI' ; supported:{$ifdef FPC_ARMEL}true{$else}false{$endif}), + (name: 'EABI' ; supported:{$if defined(arm)}true{$else}false{$endif}), (name: 'ARMEB' ; supported:{$ifdef FPC_ARMEB}true{$else}false{$endif}), - (name: 'EABIHF' ; supported:{$ifdef FPC_ARMHF}true{$else}false{$endif}), + (name: 'EABIHF' ; supported:{$if defined(arm)}true{$else}false{$endif}), (name: 'OLDWIN32GNU'; supported:{$ifdef I386}true{$else}false{$endif}), (name: 'AARCH64IOS'; supported:{$ifdef aarch64}true{$else}false{$endif}), (name: 'LINUX386_SYSV'; supported:{$if defined(i386)}true{$else}false{$endif}) diff --git a/compiler/systems/t_linux.pas b/compiler/systems/t_linux.pas index d8228014d0..532ae66212 100644 --- a/compiler/systems/t_linux.pas +++ b/compiler/systems/t_linux.pas @@ -155,12 +155,16 @@ begin {$ifdef arm} { some newer Debian have the crt*.o files at uncommon locations, for other arm flavours, this cannot hurt } -{$ifdef FPC_ARMHF} - LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabihf',true); -{$endif FPC_ARMHF} -{$ifdef FPC_ARMEL} - LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabi',true); -{$endif} + if target_info.abi=abi_eabihf then + begin + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabihf',true); + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib/arm-linux-gnueabihf',true); + end; + if target_info.abi=abi_eabi then + begin + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/arm-linux-gnueabi',true); + LibrarySearchPath.AddLibraryPath(sysrootpath,'=/lib/arm-linux-gnueabi',true); + end; {$endif arm} {$ifdef x86_64} LibrarySearchPath.AddLibraryPath(sysrootpath,'=/usr/lib/x86_64-linux-gnu',true);