From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111079 invoked by alias); 13 Jun 2017 20:13:37 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 110998 invoked by uid 89); 13 Jun 2017 20:13:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=11878, 11877 X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 7200E624D7 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 7200E624D7 Subject: Re: [PATCH] Make copy of from GCC 7 [BZ #21573] To: "H.J. Lu" , Andreas Schwab Cc: GNU C Library References: <20170613113813.GA7656@gmail.com> From: Florian Weimer Message-ID: <230d2cab-8085-bb7e-68cc-38de409397a7@redhat.com> Date: Tue, 13 Jun 2017 20:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------C4218A7A1FAADFAAC690BB4F" X-SW-Source: 2017-06/txt/msg00575.txt.bz2 This is a multi-part message in MIME format. --------------C4218A7A1FAADFAAC690BB4F Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-length: 621 On 06/13/2017 01:54 PM, H.J. Lu wrote: > - echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "/$1:/{s/:\$//;p}" > + echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}" > } > CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" > + # Also make a copy of from GCC 7 to prevent it from > + # including /usr/include/stdlib.h. > + CXX_CSTDLIB_HEADER="$CXX_CSTDLIB_HEADER $(find_cxx_header bits/std_abs.h)" I think the attached patch is needed to suppress the error message if the header does not exist. (Regenerated configure file not shown in the patch.) Thanks, Florian --------------C4218A7A1FAADFAAC690BB4F Content-Type: text/x-patch; name="find_cxx_header.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="find_cxx_header.patch" Content-length: 693 configure: Suppress expected compiler error message 2017-06-13 Florian Weimer * configure.ac (find_cxx_header): Suppress compiler error message. diff --git a/configure.ac b/configure.ac index d74bd44..3f486d6 100644 --- a/configure.ac +++ b/configure.ac @@ -1187,7 +1187,8 @@ AC_SUBST(CXX_SYSINCLUDES) # copy of those headers in Makerules. if test -n "$CXX"; then find_cxx_header () { - echo "#include <$1>" | $CXX -M -MP -x c++ - | sed -n "\,$1:,{s/:\$//;p}" + echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \ + | sed -n "\,$1:,{s/:\$//;p}" } CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" CXX_CMATH_HEADER="$(find_cxx_header cmath)" --------------C4218A7A1FAADFAAC690BB4F--