GNU bug report logs - #54621
2.4.7 breaks if AR_FLAGS contains a space

Previous Next

Package: libtool;

Reported by: Alexandre Duret-Lutz <adl <at> lrde.epita.fr>

Date: Tue, 29 Mar 2022 08:36:02 UTC

Severity: normal

Found in version 2.4.7

To reply to this bug, email your comments to 54621 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-libtool <at> gnu.org:
bug#54621; Package libtool. (Tue, 29 Mar 2022 08:36:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Alexandre Duret-Lutz <adl <at> lrde.epita.fr>:
New bug report received and forwarded. Copy sent to bug-libtool <at> gnu.org. (Tue, 29 Mar 2022 08:36:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Alexandre Duret-Lutz <adl <at> lrde.epita.fr>
To: bug-libtool <at> gnu.org
Subject: 2.4.7 breaks if AR_FLAGS contains a space
Date: Tue, 29 Mar 2022 10:35:21 +0200
Hi!

When compiling with link-time optimization, I'm first running configure
with something like this:

./configure \
   LDFLAGS='-fuse-linker-plugin' \
   NM='nm --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so' \
   ARFLAGS='cr --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so' \
   AR_FLAGS='cr --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so' \
   RANLIB='ranlib --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so' \
   CFLAGS='-flto=jobserver -fprofile-generate' \
   CXXFLAGS='-flto=jobserver -fprofile-generate'

Libtool 2.4.6 had no problem with this.

In Libtool 2.4.7, the change to unify the handling for ARFLAGS and
AR_FLAGS seems to have introduced a quoting problem.   During link
I see many message like this:

| ../libtool: line 153: --plugin: command not found
| libtool: link: ar  .libs/libpico.a .libs/libpico_la-picosat.o 
| ar: invalid option -- '.'

And indeed, the generated libtool script contains an unquoted assignment
to lt_ar_flags:

   149  # The archiver.
   150  AR="ar"
   151  
   152  # Flags to create an archive (by configure).
   153  lt_ar_flags=cr --plugin /usr/lib/gcc/x86_64-linux-gnu/11/liblto_plugin.so
   154  
   155  # Flags to create an archive.
   156  AR_FLAGS=${ARFLAGS-"$lt_ar_flags"}




This bug report was last modified 2 years and 36 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.