From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2119) id 8336F3858C20; Tue, 1 Nov 2022 20:29:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8336F3858C20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1667334551; bh=i2/ocOFiHeJXe0+FTFbHGqBtOE+M4N1ZZJKcVvxs5gs=; h=From:To:Subject:Date:From; b=b9qTMhHAsmtqKjAPjrIQQLMcbWHaXsluclAxokedP4iStKdmO6OU5DBz2exkX/nSH cebSo38g3sbRk8y97/zcCYv/8nbpc1yPkhPUupPuvn2oYXuUBddVAx4RztWYEEhsoH 9U+aDFLKT8p4NwFFLqF9uWiQ3B4N9DuFsrKTgtBw= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jeff Law To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3600] configure: cache result of "sys/sdt.h" header check X-Act-Checkin: gcc X-Git-Author: David Seifert X-Git-Refname: refs/heads/master X-Git-Oldrev: e5c15eb183f17e806ad6b58c9497321ded87866f X-Git-Newrev: 4f8aac77e05d0ae0b7f242fd1aa344d36ff52ceb Message-Id: <20221101202911.8336F3858C20@sourceware.org> Date: Tue, 1 Nov 2022 20:29:11 +0000 (GMT) List-Id: https://gcc.gnu.org/g:4f8aac77e05d0ae0b7f242fd1aa344d36ff52ceb commit r13-3600-g4f8aac77e05d0ae0b7f242fd1aa344d36ff52ceb Author: David Seifert Date: Tue Nov 1 14:27:53 2022 -0600 configure: cache result of "sys/sdt.h" header check Use AC_CACHE_CHECK to store the result of the header check for systemtap's "sys/sdt.h", which is similar in spirit to libstdc++'s AC_CACHE_CHECK(..., glibcxx_cv_sys_sdt_h). gcc/ * configure.ac: Add AC_CACHE_CHECK(..., gcc_cv_sys_sdt_h). * configure: Regenerate. Diff: --- gcc/configure | 20 +++++++++++++++----- gcc/configure.ac | 16 +++++++++------- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/gcc/configure b/gcc/configure index 0ee4be40e55..e55c6566e89 100755 --- a/gcc/configure +++ b/gcc/configure @@ -31103,15 +31103,25 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 $as_echo_n "checking sys/sdt.h in the target C library... " >&6; } -have_sys_sdt_h=no -if test -f $target_header_dir/sys/sdt.h; then - have_sys_sdt_h=yes +if ${gcc_cv_sys_sdt_h+:} false; then : + $as_echo_n "(cached) " >&6 +else + + gcc_cv_sys_sdt_h=no + if test -f $target_header_dir/sys/sdt.h; then + gcc_cv_sys_sdt_h=yes + fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gcc_cv_sys_sdt_h" >&5 +$as_echo "$gcc_cv_sys_sdt_h" >&6; } +if test x$gcc_cv_sys_sdt_h = xyes; then : + $as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 -$as_echo "$have_sys_sdt_h" >&6; } # Check if TFmode long double should be used by default or not. # Some glibc targets used DFmode long double, but with glibc 2.4 diff --git a/gcc/configure.ac b/gcc/configure.ac index 4ecccffc324..9ca77797894 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -6778,14 +6778,16 @@ AC_SUBST([enable_default_ssp]) # Test for on the target. GCC_TARGET_TEMPLATE([HAVE_SYS_SDT_H]) -AC_MSG_CHECKING(sys/sdt.h in the target C library) -have_sys_sdt_h=no -if test -f $target_header_dir/sys/sdt.h; then - have_sys_sdt_h=yes - AC_DEFINE(HAVE_SYS_SDT_H, 1, +AC_CACHE_CHECK([sys/sdt.h in the target C library], [gcc_cv_sys_sdt_h], [ + gcc_cv_sys_sdt_h=no + if test -f $target_header_dir/sys/sdt.h; then + gcc_cv_sys_sdt_h=yes + fi +]) +AS_IF([test x$gcc_cv_sys_sdt_h = xyes], [ + AC_DEFINE([HAVE_SYS_SDT_H], [1], [Define if your target C library provides sys/sdt.h]) -fi -AC_MSG_RESULT($have_sys_sdt_h) +]) # Check if TFmode long double should be used by default or not. # Some glibc targets used DFmode long double, but with glibc 2.4