From unknown Sat Jun 21 03:22:45 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#54621 <54621@debbugs.gnu.org> To: bug#54621 <54621@debbugs.gnu.org> Subject: Status: 2.4.7 breaks if AR_FLAGS contains a space Reply-To: bug#54621 <54621@debbugs.gnu.org> Date: Sat, 21 Jun 2025 10:22:45 +0000 retitle 54621 2.4.7 breaks if AR_FLAGS contains a space reassign 54621 libtool submitter 54621 Alexandre Duret-Lutz severity 54621 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 29 04:35:39 2022 Received: (at submit) by debbugs.gnu.org; 29 Mar 2022 08:35:40 +0000 Received: from localhost ([127.0.0.1]:59728 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ7KF-0005iw-Kl for submit@debbugs.gnu.org; Tue, 29 Mar 2022 04:35:39 -0400 Received: from lists.gnu.org ([209.51.188.17]:49170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nZ7KE-0005io-Df for submit@debbugs.gnu.org; Tue, 29 Mar 2022 04:35:38 -0400 Received: from eggs.gnu.org ([209.51.188.92]:46068) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ7KC-0005lR-Df for bug-libtool@gnu.org; Tue, 29 Mar 2022 04:35:37 -0400 Received: from smtp.lrde.epita.fr ([91.243.117.225]:47112) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nZ7K8-000724-6K for bug-libtool@gnu.org; Tue, 29 Mar 2022 04:35:34 -0400 Received: from goulash (unknown [192.168.105.122]) by smtp.lrde.epita.fr (Postfix) with ESMTPSA id A0B7C435AA for ; Tue, 29 Mar 2022 10:35:21 +0200 (CEST) From: Alexandre Duret-Lutz To: bug-libtool@gnu.org Subject: 2.4.7 breaks if AR_FLAGS contains a space Date: Tue, 29 Mar 2022 10:35:21 +0200 Message-ID: <87v8vxw3zq.fsf@lrde.epita.fr> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=91.243.117.225; envelope-from=adl@lrde.epita.fr; helo=smtp.lrde.epita.fr X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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"}