Re: [PATCH] collect2: avoid failure when passing text files in an AIX archive

2021-05-20 Thread David Edelsohn via Gcc-patches
This should not use warning_at because there is no location.  There is
a separate "warning" diagnostic that should be used.

I will test with a correct implementation.

Thanks, David

On Thu, May 20, 2021 at 4:13 AM CHIGOT, CLEMENT  wrote:
>
> AIX ld allows archives to contain text files by simply ignoring
> them and printing a warning.
> This patch enables the same behavior for collect2.
>
> gcc/ChangeLog:
> 2021-05-20  Clément Chigot  
>
> * collect2.c (scan_prog_file): Skip none-COFF files instead
> of raising an error.
>
>
> Maybe the warning message can be changed as it can say that
> an archive is not a COFF file instead of the file inside the archive.
> But I don't know how to handle location files under "po/" afterwards,
> and it was already the case before.
>
> Please apply if accepted.
>
> Clément Chigot
> ATOS Bull SAS
> 1 rue de Provence - 38432 Échirolles - France
>


[PATCH] collect2: avoid failure when passing text files in an AIX archive

2021-05-20 Thread CHIGOT, CLEMENT via Gcc-patches
AIX ld allows archives to contain text files by simply ignoring
them and printing a warning.
This patch enables the same behavior for collect2.

gcc/ChangeLog:
2021-05-20  Clément Chigot  

* collect2.c (scan_prog_file): Skip none-COFF files instead
of raising an error.


Maybe the warning message can be changed as it can say that 
an archive is not a COFF file instead of the file inside the archive. 
But I don't know how to handle location files under "po/" afterwards, 
and it was already the case before. 

Please apply if accepted. 

Clément Chigot
ATOS Bull SAS
1 rue de Provence - 38432 Échirolles - France



0001-collect2-avoid-failure-when-passing-text-files-in-an.patch
Description: 0001-collect2-avoid-failure-when-passing-text-files-in-an.patch