From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 1A7DD3884577; Fri, 28 Oct 2022 17:38:07 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1A7DD3884577 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1666978687; bh=aCSeC/gx5FKqyybGHu7743ccjcc0VFxlaTZnGEzA+RU=; h=From:To:Subject:Date:From; b=eKHO1EygnfXHrLYIDiQC9b/ysCEOqK7HpmJn/rSOOQuH1Pc4WA9RH1Uy5ypDHspqJ E9PSt1RxmKa+oHrD7LEMIdjJQng+TnpDnUhMGk3ZXzbhXIYKaQQ5JulZIw7EVNvo1d hrdFS61HztbJwih7xOH48xyxYMDZ8XaSBOLtQ1QY= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Adhemerval Zanella To: glibc-cvs@sourceware.org Subject: [glibc/azanella/clang] Rewrite find_cxx_header config configure.ac X-Act-Checkin: glibc X-Git-Author: Adhemerval Zanella X-Git-Refname: refs/heads/azanella/clang X-Git-Oldrev: e50a72e02b164e8a9bf4102767a17c0f7e5b68ad X-Git-Newrev: 66a1757257c025ffbc261c1570703d8020e51986 Message-Id: <20221028173807.1A7DD3884577@sourceware.org> Date: Fri, 28 Oct 2022 17:38:07 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=66a1757257c025ffbc261c1570703d8020e51986 commit 66a1757257c025ffbc261c1570703d8020e51986 Author: Adhemerval Zanella Date: Tue Mar 8 16:40:35 2022 -0300 Rewrite find_cxx_header config configure.ac To work with clang++. Diff: --- configure | 4 ++-- configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index ff2c406b3b..26bd8200dd 100755 --- a/configure +++ b/configure @@ -5579,8 +5579,8 @@ fi # copy of those headers in Makerules. if test -n "$CXX"; then find_cxx_header () { - echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \ - | sed -n "\,$1:,{s/:\$//;p}" + echo "#include <$1>" | $CXX -H -fsyntax-only -x c++ - 2>&1 \ + | sed -rn "\,^\.? .,{s/^\.*\. //p}" } CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" CXX_CMATH_HEADER="$(find_cxx_header cmath)" diff --git a/configure.ac b/configure.ac index eb5bc6a131..a009e7a17f 100644 --- a/configure.ac +++ b/configure.ac @@ -1136,8 +1136,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++ - 2>/dev/null \ - | sed -n "\,$1:,{s/:\$//;p}" + echo "#include <$1>" | $CXX -H -fsyntax-only -x c++ - 2>&1 \ + | sed -rn "\,^\.? .,{s/[^\.]*\. //p}" } CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" CXX_CMATH_HEADER="$(find_cxx_header cmath)"