From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1791) id 436A238344E3; Thu, 9 Jun 2022 13:14:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 436A238344E3 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: 84195891c5075e4a7bc1477429b8959718206521 X-Git-Newrev: d4541205284af9b98ca5980ddddb753d3bd30d22 Message-Id: <20220609131429.436A238344E3@sourceware.org> Date: Thu, 9 Jun 2022 13:14:29 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jun 2022 13:14:29 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d4541205284af9b98ca5980ddddb753d3bd30d22 commit d4541205284af9b98ca5980ddddb753d3bd30d22 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 666e62c8ff..83009454a8 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 b3dcf28373..06bb2d79e7 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)"