From: Peter Michael Green Date: Thu, 30 Mar 2023 19:31:30 +0000 (+0100) Subject: Use ld.bfd explicitly X-Git-Tag: archive/raspbian/3.2.2+dfsg-20+rpi1^2~32 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0df8ad7daadffb20f7422027a411c8be2ef93344;p=fpc.git Use ld.bfd explicitly Bug-Debian: http://bugs.debian.org/620815 Bug-Debian: http://bugs.debian.org/624525 Bug-Debian: http://bugs.debian.org/717651 Freepascal is broken with ld.gold, previously we conflicted with binutils-gold but that makes us uninstallable with the new binutils. So instead we take the approach of patching fpc to use ld.bfd directly Gbp-Pq: Name use-bfd-explicitly.diff --- diff --git a/fpcsrc/compiler/systems/t_linux.pas b/fpcsrc/compiler/systems/t_linux.pas index ac7c74d8..b5089bbc 100644 --- a/fpcsrc/compiler/systems/t_linux.pas +++ b/fpcsrc/compiler/systems/t_linux.pas @@ -1409,7 +1409,7 @@ begin if HasExports then cmdstr:=cmdstr+' -E'; - success:=DoExec(FindUtil(utilsprefix+BinStr),CmdStr,true,false); + success:=DoExec(FindUtil(utilsprefix+BinStr)+'.bfd',CmdStr,true,false); { Create external .dbg file with debuginfo } if success and (cs_link_separate_dbg_file in current_settings.globalswitches) then @@ -1477,7 +1477,7 @@ begin Replace(cmdstr,'$SONAME',SoNameStr); Replace(cmdstr,'$MAP',mapstr); Replace(cmdstr,'$GCSECTIONS',GCSectionsStr); - success:=DoExec(FindUtil(utilsprefix+binstr),cmdstr,true,false); + success:=DoExec(FindUtil(utilsprefix+binstr)+'.bfd',cmdstr,true,false); { Strip the library ? } if success and (cs_link_strip in current_settings.globalswitches) then