From: Eric Botcazou Date: Fri, 23 Mar 2018 23:12:49 +0000 (+0000) Subject: re PR ada/85036 (--disable-bootstrap --enable-languages=ada[,c++] fails) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f8e56962463899a75aa424b93e7ba32cabddd504;p=gcc.git re PR ada/85036 (--disable-bootstrap --enable-languages=ada[,c++] fails) PR ada/85036 * gnatlink.adb (Process_Args): Drop existing link switches if multiple switches are passed for --LINK. From-SVN: r258827 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index cb071fe8665..d75028d2fa4 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,9 @@ +2018-03-23 Eric Botcazou + + PR ada/85036 + * gnatlink.adb (Process_Args): Drop existing link switches if multiple + switches are passed for --LINK. + 2018-03-12 Eric Botcazou PR ada/82813 diff --git a/gcc/ada/gnatlink.adb b/gcc/ada/gnatlink.adb index e28ba34c443..cea664bf75f 100644 --- a/gcc/ada/gnatlink.adb +++ b/gcc/ada/gnatlink.adb @@ -544,6 +544,11 @@ procedure Gnatlink is end if; -- The other arguments are passed as-is to the linker + -- and override those coming from --GCC= if any. + + if L_Args.all'Last >= 2 then + Gcc_Linker_Options.Set_Last (0); + end if; for J in 2 .. L_Args.all'Last loop Gcc_Linker_Options.Increment_Last;