From patchwork Tue Jun 13 11:38:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "H.J. Lu" X-Patchwork-Id: 20985 Received: (qmail 67403 invoked by alias); 13 Jun 2017 11:38:15 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 67385 invoked by uid 89); 13 Jun 2017 11:38:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pg0-f44.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mime-version :content-disposition:user-agent; bh=eZ2/CegIW1hzD+QD4mBwSBlhBgi5c1miAlB7XOUHJJQ=; b=mIngGQMWf4e/j40zF3LfEAX6lUmzj0QGZI0Gum1AhsSYRJgeJfbsQ9GvTUSjsZ+WbA J2WYoDA2ElZVNbONKoERNoonZAq8YHiyRtLY4EjGT8RBPkyTAeO7QFU0iD7spn9qmMYV XjicYESfSwJUrsI5iEKHoOc06Ps6c6BETbB9180Uy2uJ/kKcboh2eE9cHiYAzcrAF0aU TxrKj5eM1auiQ9fI6RO+dxWaznqe47whl5lKFfKpqu97vvmmr0MeXeWndOM0y9Cfmn5j gcN3sqyfUSBfukfpOq6U4osC/z+uqrDv7BnkKfmnw5UA3DV7MwWAgs0NJqNMMixwcjvU IX8A== X-Gm-Message-State: AODbwcDFgMZXPEQBn2T4LDlcXF0SoVM9p7g1Vm/2s6uTymC0Han+/qhf FsvZw97aw3Jin48g X-Received: by 10.99.124.91 with SMTP id l27mr44260450pgn.122.1497353895437; Tue, 13 Jun 2017 04:38:15 -0700 (PDT) Date: Tue, 13 Jun 2017 04:38:13 -0700 From: "H.J. Lu" To: GNU C Library Subject: [PATCH] Make copy of from GCC 7 [BZ #21573] Message-ID: <20170613113813.GA7656@gmail.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.8.0 (2017-02-23) from GCC 7 will include /usr/include/stdlib.h from "#include_next" (instead of stdlib/stdlib.h in the glibc source directory), and this turns up as a make dependency. Also make a copy of to prevent it from including /usr/include/stdlib.h. OK for master? H.J. --- [BZ #21573] * configure.ac (find_cxx_header): Add a second argument to support . (CXX_CSTDLIB_HEADER): Updated. Also make a copy of . (CXX_CMATH_HEADER): Updated. * configure: Regenerated. --- configure | 9 ++++++--- configure.ac | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/configure b/configure index 422482f..888224e 100755 --- a/configure +++ b/configure @@ -5336,10 +5336,13 @@ fi # 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++ - | sed -n "/$2:/{s/:\$//;p}" } - CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" - CXX_CMATH_HEADER="$(find_cxx_header cmath)" + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib 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 bits\\\/std_abs.h)" + CXX_CMATH_HEADER="$(find_cxx_header cmath cmath)" fi diff --git a/configure.ac b/configure.ac index 7f43042..00cf227 100644 --- a/configure.ac +++ b/configure.ac @@ -1187,10 +1187,13 @@ 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++ - | sed -n "/$2:/{s/:\$//;p}" } - CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" - CXX_CMATH_HEADER="$(find_cxx_header cmath)" + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib 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 bits\\\/std_abs.h)" + CXX_CMATH_HEADER="$(find_cxx_header cmath cmath)" fi AC_SUBST(CXX_CSTDLIB_HEADER) AC_SUBST(CXX_CMATH_HEADER)