From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20002 invoked by alias); 9 Mar 2012 15:38:40 -0000 Received: (qmail 19994 invoked by uid 22791); 9 Mar 2012 15:38:39 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_NUMERIC_HELO,SARE_HEAD_8BIT_SPAM,SARE_SUB_ENC_UTF8,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from plane.gmane.org (HELO plane.gmane.org) (80.91.229.3) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 09 Mar 2012 15:38:26 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1S61tg-0000al-S6 for gcc-patches@gcc.gnu.org; Fri, 09 Mar 2012 16:38:24 +0100 Received: from 193.50.110.167 ([193.50.110.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2012 16:38:24 +0100 Received: from ludovic.courtes by 193.50.110.167 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Mar 2012 16:38:24 +0100 To: gcc-patches@gcc.gnu.org From: ludovic.courtes@inria.fr (Ludovic =?iso-8859-1?Q?Court=E8s?=) Subject: [PATCH] =?utf-8?Q?Don=E2=80=99t?= insert white space in =?utf-8?Q?=E2=80=98orig=5Foption=5Fwith=5Fargs=5Ftext=E2=80=99?= for OPT_l Date: Fri, 09 Mar 2012 15:38:00 -0000 Message-ID: <87ipidvl7h.fsf@inria.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?iso-8859-1?Q?Vent=F4se?= an 220 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.93 (gnu/linux) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-03/txt/msg00630.txt.bz2 --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1140 Hi, This patch changes =E2=80=98generate_option=E2=80=99 to not insert any whit= e spaces after =E2=80=98-l=E2=80=99. This fixes a problem introduced in GCC 4.6 (r163459) whereby =E2=80=98gfortran -v=E2=80=99 would emit erroneous strings like this: Driving: [=E2=80=A6] -l gfortran -l m -shared-libgcc [=E2=80=A6] Note the space after =E2=80=98-l=E2=80=99. (In turn, that would confuse Libtool=E2=80=99s =E2=80=98_LT_SYS_HIDDEN_LIBD= EPS=E2=80=99 macro, which would determine something like this: postdeps=3D"[=E2=80=A6] -L/nix/store/wnzgsfhmb3ys5ssfgpcpwjnmdzn717mk-gfo= rtran-4.6.3/lib -l -l [=E2=80=A6]" eventually leading to a link command-line like this: libtool: link: gfortran -shared [=E2=80=A6] -l -L/nix/store/blsdhiik2lk4z= mz3hbzf77g6hcrq7ckx-gfortran-wrapper-4.6.3/bin [=E2=80=A6] leading to an error like: ld: cannot find -l-L/nix/store/blsdhiik2lk4zmz3hbzf77g6hcrq7ckx-gfortran-= wrapper-4.6.3/bin Ouch!) Thanks, Ludo=E2=80=99. 2012-03-09 Ludovic Court=C3=A8s * gcc/opts-common.c (generate_option): Don't insert white space in `canonical_option' when OPT_INDEX is OPT_l. --=-=-= Content-Type: text/x-patch Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 625 diff --git a/gcc/opts-common.c b/gcc/opts-common.c index 354bce0..60ec02d 100644 --- a/gcc/opts-common.c +++ b/gcc/opts-common.c @@ -931,6 +931,12 @@ generate_option (size_t opt_index, const char *arg, in= t value, break; =20 case 2: + if (opt_index =3D=3D OPT_l) + /* Don't insert any white spaces between `-l' and its argument. */ + decoded->orig_option_with_args_text + =3D concat (decoded->canonical_option[0], + decoded->canonical_option[1], NULL); + else decoded->orig_option_with_args_text =3D concat (decoded->canonical_option[0], " ", decoded->canonical_option[1], NULL); --=-=-=-- --==-=-= Content-Type: application/pgp-signature Content-length: 197 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEARECAAYFAk9aI+UACgkQd92V4upS7PSkMgCfUdj8dtWo+gEcz2s3eLOx+Bjx HDAAoIj8JGPgz9TznHcD69T46pdxUj10 =sfna -----END PGP SIGNATURE----- --==-=-=--