GNU bug report logs -
#78433
[PATCH] Search for gcc-ar
Previous Next
To reply to this bug, email your comments to 78433 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
automake-patches <at> gnu.org
:
bug#78433
; Package
automake-patches
.
(Thu, 15 May 2025 02:48:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sam James <sam <at> gentoo.org>
:
New bug report received and forwarded. Copy sent to
automake-patches <at> gnu.org
.
(Thu, 15 May 2025 02:48:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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?
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}
--
2.49.0
Information forwarded
to
automake-patches <at> gnu.org
:
bug#78433
; Package
automake-patches
.
(Thu, 15 May 2025 03:17:02 GMT)
Full text and
rfc822 format available.
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}
Information forwarded
to
automake-patches <at> gnu.org
:
bug#78433
; Package
automake-patches
.
(Thu, 15 May 2025 22:25:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 78433 <at> debbugs.gnu.org (full text, mbox):
Hi Sam,
but how does this look in principle?
-AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false])
+AC_CHECK_TOOLS([AR], [gcc-ar ar lib "link -lib"], [false])
Seems about as simple a change as it could be. Assuming that gcc-ar
behaves like normal ar in normal situations (no plugins or LTO
involved), I don't see a problem with it. It even seems safe enough to
me to make the next release without another pretest. Wdyt?
My only comment on the patch is that I think this searching for gcc-ar
should be mentioned in the documentation for AM_PROG_AR. (I can do that.)
I'm still testing this and going to play with it some more in the wild,
Do you want me to install the patch? A few people run automake from the
dev sources so it would get some minor additional testing that way.
Thanks,
Karl
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.