Re: [PATCH] compiler-gcc.h: Disable __retain on gcc-11
From: Andreas Schwab
Date: Tue Sep 24 2024 - 13:38:16 EST
On Sep 24 2024, Geert Uytterhoeven wrote:
> All my gcc-11 compilers (Ubuntu 11.4.0-1ubuntu1~22.04) claim to support
> the __retain__ attribute, but only riscv64-linux-gnu-gcc-11 and
> x86_64-linux-gnu-gcc-11 (not x86_64-linux-gnux32-gcc-11!) actually do.
> The arm-linux-gnueabi-gcc-11.5.0 compiler from kernel.org crosstool
> fails in the same way:
>
> error: ‘retain’ attribute ignored [-Werror=attributes]
>
> All my gcc-12 compilers seem to support the attribute.
That ultimately depends on binutils support for SHF_GNU_RETAIN (2.36+).
--
Andreas Schwab, schwab@xxxxxxxxxxxxxx
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."