[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: config.guess problem with pgcc
From: |
Eric Blake |
Subject: |
Re: config.guess problem with pgcc |
Date: |
Wed, 20 Aug 2014 10:10:38 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 |
On 08/20/2014 09:47 AM, Thomas Jahns wrote:
> Hello,
>
> I've found and fixed a problem where pgcc -E translates its input to contain
> extra spaces. Since config.guess expects the preprocessor output to be a well
> formed shell variable assignment, I've added some sed code to ensure this.
>
> Please consider the attached patch for inclusion in autoconf.
>
> Regards, Thomas
>
> - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
> + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '/^LIBC/{s/LIBC *=
> *\(.*\)$/LIBC='"'"'\1'"'"'/;p;}'`
Thanks for the patch. We like to keep to 80-column lines where possible;
also, that sed expression is rather verbose, when compared to the
equivalent:
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null \
| sed -n 's/^LIBC *= */LIBC=/p'`
I'll apply the shortened version in your name, if you agree that it
still works.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature