[build] Avoid use of unportable grep -q

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Fri May 21 16:10:00 GMT 2010


Jason Merrill <jason@redhat.com> writes:

> On 05/10/2010 08:46 AM, Rainer Orth wrote:
>> During a recent build on Solaris 8 and 9 with only the native tools, I
>> noticed that a couple of uses of grep -q have crept in, which is
>> unportable according to the Autoconf manual, and not supported by
>> Solaris /usr/bin/grep.
>>
>> The following patch fixes some of them.  The remaining uses are in
>> config.guess (which would have to be fixed upstream first, but only
>> affects NetBSD, HP-UX and Linux) and config/tcl.m4, which is probably
>> unused at least in the GCC side of the tree, so I've left them alone.
>>
>> Ok for mainline, 4.5 and 4.4 branches?
>
> I think you probably want to use >/dev/null 2>&1 to redirect stderr as
> well.  OK with that change.

I've been following existing praxis: of 26 instances of >/dev/null in
gcc/configure.ac, only 3 also redirect stderr.  But I'm fine either way.

Thanks.
	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



More information about the Gcc-patches mailing list