Re: [PATCH v2] compiler-gcc.h: Disable __retain on gcc-11
From: Geert Uytterhoeven
Date: Thu Oct 03 2024 - 08:53:08 EST
Hi Andreas,
On Thu, Oct 3, 2024 at 2:34 PM Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:
> On Okt 03 2024, Geert Uytterhoeven wrote:
> > On Thu, Oct 3, 2024 at 2:11 PM Andreas Schwab <schwab@xxxxxxxxxxxxxx> wrote:
> >> On Okt 03 2024, Miguel Ojeda wrote:
> >> > Otherwise, does it mean we need a build-time test?
> >>
> >> A simple gcc version test definitely does not suffice.
> >>
> >> The suport for retain also depends on HAVE_INITFINI_ARRAY_SUPPORT, which
> >> is usually enabled by default (depends on glibc support, but that is
> >> much older), but can be disabled with --disable-initfini-array.
> >
> > FTR, no --disable-initfini-array seen here:
>
> --disable-initfini-array is the default for cross compilers.
Apparently not for cross compilers targeting riscv64?
I.e. no --enable-initfini-array seen here:
$ riscv64-linux-gnu-gcc-11 -v
Using built-in specs.
COLLECT_GCC=/usr/bin/riscv64-linux-gnu-gcc-11
COLLECT_LTO_WRAPPER=/usr/lib/gcc-cross/riscv64-linux-gnu/11/lto-wrapper
Target: riscv64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
11.4.0-1ubuntu1~22.04'
--with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs
--enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2
--prefix=/usr --with-gcc-major-version-only --program-suffix=-11
--enable-shared --enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libitm --disable-libquadmath --disable-libquadmath-support
--enable-plugin --enable-default-pie --with-system-zlib
--enable-libphobos-checking=release --without-target-system-zlib
--enable-multiarch --disable-werror --disable-multilib
--with-arch=rv64gc --with-abi=lp64d --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu
--target=riscv64-linux-gnu --program-prefix=riscv64-linux-gnu-
--includedir=/usr/riscv64-linux-gnu/include
--with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds