GNU bug report logs -
#78433
[PATCH] Search for gcc-ar
Previous Next
Reported by: Sam James <sam <at> gentoo.org>
Date: Thu, 15 May 2025 02:48:02 UTC
Severity: normal
Tags: patch
Done: Karl Berry <karl <at> freefriends.org>
Bug is archived. No further changes may be made.
Full log
Message #8 received at 78433 <at> debbugs.gnu.org (full text, mbox):
Sam James <sam <at> gentoo.org> writes:
> GCC requires `ar` to have plugin support when using LTO. While the situation
> has improved as many distributions install the GCC plugin to a location
> that GNU Binutils can automatically find, this isn't required and isn't done
> by default.
>
> By searching for `gcc-ar` first, we can make this case work without
> intervention from the user.
>
> Problem reported by R. Diez in: https://savannah.gnu.org/support/?110475
>
> * m4/ar-lib.m4 (AM_PROG_AR): Search for gcc-ar.
> ---
> I'm still testing this and going to play with it some more in the wild,
> but how does this look in principle?
I've sent a patch to autoconf as well at
https://lists.gnu.org/archive/html/autoconf-patches/2025-05/msg00007.html.
>
> NEWS | 3 +++
> m4/ar-lib.m4 | 2 +-
> 2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index 30c0cd2c7..d448dba26 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -17,6 +17,9 @@ New in 1.17.92:
>
> - Support for Algol 68 added, based on the GNU Algol 68 compiler. (bug#75807)
>
> + - AM_PROG_AR now searches for 'gcc-ar' first.
> + (https://savannah.gnu.org/support/?110475)
> +
> * Bugs fixed
>
> - Do not make Perl warnings fatal, per Perl's recommendation.
> diff --git a/m4/ar-lib.m4 b/m4/ar-lib.m4
> index 568ea0798..c00c1a51e 100644
> --- a/m4/ar-lib.m4
> +++ b/m4/ar-lib.m4
> @@ -16,7 +16,7 @@ AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl
> AC_BEFORE([$0], [AC_PROG_AR])dnl
> AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
> AC_REQUIRE_AUX_FILE([ar-lib])dnl
> -AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
> +AC_CHECK_TOOLS([AR], [gcc-ar ar lib "link -lib"], [false])
> : ${AR=ar}
> : ${ARFLAGS=cr}
This bug report was last modified today.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.