From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13246 invoked by alias); 24 May 2003 20:17:45 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 13188 invoked from network); 24 May 2003 20:17:44 -0000 Received: from unknown (HELO mail.libertysurf.net) (213.36.80.91) by sources.redhat.com with SMTP; 24 May 2003 20:17:44 -0000 Received: from localhost.localdomain (212.83.191.108) by mail.libertysurf.net (6.5.026) id 3ECC3D02000AA8D7; Sat, 24 May 2003 22:17:41 +0200 From: Eric Botcazou To: Joe Buck Subject: Re: non-portable construct in gcc configure script Date: Sat, 24 May 2003 21:37:00 -0000 User-Agent: KMail/1.4.3 References: <20030515180723.A1418@synopsys.com> In-Reply-To: <20030515180723.A1418@synopsys.com> Cc: gcc@gcc.gnu.org MIME-Version: 1.0 Message-Id: <200305242220.12082.ebotcazou@libertysurf.fr> Content-Type: Multipart/Mixed; boundary="------------Boundary-00=_O7REBSSBUH31RXNBF3HL" X-SW-Source: 2003-05/txt/msg02203.txt.bz2 --------------Boundary-00=_O7REBSSBUH31RXNBF3HL Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Content-length: 715 > In the test labeled > > AC_MSG_CHECKING(linker read-only and read-write section mixing) > > gcc/configure.in in 3.3 uses "grep -A1". This feature is not in Solaris's > grep. It's not in the HP-UX grep either. > > The result is that the configure output looks like > > > checking linker read-only and read-write section mixing... grep: illegal > option -- A grep: illegal option -- 1 > Usage: grep -hblcnsviw pattern file . . . > > on Solaris 2.8. The failure appears harmless, but I'm not sure. Does the attached patch cure it? The construct works on the 5 Solaris versions I have access to, but I can't directly test the configure check because it dies earlier with the native Sun tools. -- Eric Botcazou --------------Boundary-00=_O7REBSSBUH31RXNBF3HL Content-Type: text/x-diff; charset="iso-8859-1"; name="pr10663-1.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="pr10663-1.diff" Content-length: 732 Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/gcc/configure.in,v retrieving revision 1.627.2.8 diff -u -r1.627.2.8 configure.in --- configure.in 12 May 2003 18:49:18 -0000 1.627.2.8 +++ configure.in 24 May 2003 20:04:38 -0000 @@ -2319,7 +2319,10 @@ && $gcc_cv_ld -shared -o conftest1.so conftest1.o \ conftest2.o conftest3.o; then gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \ - | grep -A1 myfoosect` + | sed -n '/.*myfoosect.*/{ + N + p + }'` if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then gcc_cv_ld_ro_rw_mix=read-only --------------Boundary-00=_O7REBSSBUH31RXNBF3HL--