From patchwork Sat May 12 14:00:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, Pan2 via Gcc-patches" X-Patchwork-Id: 912415 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-477606-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Zsg725Xt"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jpXn3X1cz9s2L for ; Sun, 13 May 2018 00:01:27 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :reply-to:to:cc:subject:date:message-id; q=dns; s=default; b=Yuw 2Vibi7mANEPVaoLPE1egVk5/iF2U8EbcTn0z43/SeDJuDrxHNiD7UMdD4s79jJwH yxwXmkmIIaa325tcakxQw1V802XZ66uta5XkP9r0SkpjjanNJ6iOpI/vfrTN6pxb R2M8bxDSTxPNZM2P3C+CRuQnJdKLWVBi9mGYHHBk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :reply-to:to:cc:subject:date:message-id; s=default; bh=iC4EY17GK DUeLRyzxuOdR+hGkw8=; b=Zsg725XtQt3LPr8DCItMZ8MLXKiQ6uiSa5OfKFK1f vtaXRATpMpfXgI1rtxX7hxzSiM/YI1mzFfpFFGDTsWcteadS2vhe7ED08q+yhjUY rHhQY7cm+coXTKkgQnFDO6ErgTUAFT8wBH4gF0hUprxq7uSyzr3+le0K8x4ugdLm 5c= Received: (qmail 118920 invoked by alias); 12 May 2018 14:00:48 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 118894 invoked by uid 89); 12 May 2018 14:00:47 -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, FREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=xyes, UD:ru, H*r:esmtpa X-HELO: smtpng2.m.smailru.net Received: from smtpng2.m.smailru.net (HELO smtpng2.m.smailru.net) (94.100.179.3) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 12 May 2018 14:00:37 +0000 Received: by smtpng2.m.smailru.net with esmtpa (envelope-from ) id 1fHV4c-00056Y-ID; Sat, 12 May 2018 17:00:35 +0300 Received: by sf.home (Postfix, from userid 1000) id 882741E9AA426; Sat, 12 May 2018 15:00:30 +0100 (BST) X-Patchwork-Original-From: "Sergei Trofimovich via gcc-patches" From: "Li, Pan2 via Gcc-patches" Reply-To: Sergei Trofimovich To: Gcc Patch List Cc: Sergei Trofimovich Subject: [PATCH] gcc/configure.ac: add --disable-systemtap switch Date: Sat, 12 May 2018 15:00:25 +0100 Message-Id: <20180512140025.5957-1-slyfox@inbox.ru> Authentication-Results: smtpng2.m.smailru.net; auth=pass smtp.auth=slyfox@inbox.ru smtp.mailfrom=slyfox@inbox.ru X-7FA49CB5: 0D63561A33F958A546514C4EAFA5D4B884062A69EB52400D985958D3EF2919B0725E5C173C3A84C39B1AFFD6BD8BDD31839E3E4265FB683B4163C681A99F5D66C4224003CC836476C0CAF46E325F83A50BF2EBBBDD9D6B0F9A3D58A9A349F5073B503F486389A921A5CC5B56E945C8DA X-Mailru-Sender: 689FA8AB762F73934AF66922F1D03E91F569967FBFE7EA1DE2AD555FC2820519BD85980B5B894388CD690F95C3F0CFAE862E093C60B48F314D0521622E1491BE5FEEDEB644C299C0ED14614B50AE0675 X-IsSubscribed: yes From: Sergei Trofimovich Before the change systemtap probes were enabled if target headers had sys/sdt.h at ./configure time. After the change explicitly ask to enable or disable for probe support and not rely on automagic dependency discovery. Bug: https://bugs.gentoo.org/654748 Bug: https://gcc.gnu.org/bugzilla/PR61257 Signed-off-by: Sergei Trofimovich --- gcc/configure | 34 ++++++++++++++++++++++++++-------- gcc/configure.ac | 30 ++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 16 deletions(-) diff --git a/gcc/configure b/gcc/configure index 7d69faf549d..5e96c4f99fc 100755 --- a/gcc/configure +++ b/gcc/configure @@ -946,6 +946,7 @@ enable_gnu_unique_object enable_linker_build_id enable_libssp enable_default_ssp +enable_systemtap with_long_double_128 with_long_double_format with_gc @@ -1688,6 +1689,7 @@ Optional Features: compiler will always pass --build-id to linker --enable-libssp enable linking against libssp --enable-default-ssp enable Stack Smashing Protection as default + --disable-systemtap enable systemtap static probe points [default=auto] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer @@ -18448,7 +18450,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18451 "configure" +#line 18453 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18554,7 +18556,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18557 "configure" +#line 18559 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -29297,17 +29299,33 @@ fi # Test for on the target. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking sys/sdt.h in the target C library" >&5 + +# Check whether --enable-systemtap was given. +if test "${enable_systemtap+set}" = set; then : + enableval=$enable_systemtap; enable_systemtap=$enableval +else + enable_systemtap=auto +fi + + +if test x$enable_systemtap != xno; then + { $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 + have_sys_sdt_h=no + if test -f $target_header_dir/sys/sdt.h ; then + have_sys_sdt_h=yes $as_echo "#define HAVE_SYS_SDT_H 1" >>confdefs.h -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_sys_sdt_h" >&5 $as_echo "$have_sys_sdt_h" >&6; } + if test x$enable_systemtap = xyes ; then + if test x$have_sys_sdt_h = xno ; then + as_fn_error "sys/sdt.h was not found" "$LINENO" 5 + fi + fi +fi # 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 36124b8ce90..8356e579a20 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -5965,14 +5965,28 @@ 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, - [Define if your target C library provides sys/sdt.h]) -fi -AC_MSG_RESULT($have_sys_sdt_h) + +AC_ARG_ENABLE(systemtap, +[AS_HELP_STRING([--disable-systemtap], + [enable systemtap static probe points [default=auto]])], + enable_systemtap=$enableval, + enable_systemtap=auto) + +if test x$enable_systemtap != xno; then + 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, + [Define if your target C library provides sys/sdt.h]) + fi + AC_MSG_RESULT($have_sys_sdt_h) + if test x$enable_systemtap = xyes ; then + if test x$have_sys_sdt_h = xno ; then + AC_MSG_ERROR([sys/sdt.h was not found]) + fi + fi +fi # Check if TFmode long double should be used by default or not. # Some glibc targets used DFmode long double, but with glibc 2.4