From patchwork Wed May 21 12:23:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Klose X-Patchwork-Id: 351160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 0F1DD1400A0 for ; Wed, 21 May 2014 22:24:11 +1000 (EST) Authentication-Results: ozlabs.org; dkim=pass reason="1024-bit key; unprotected key" header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=giaT1Ety; dkim-adsp=none (unprotected policy); dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type; q=dns; s=default; b=SNF0VCxq6iJ762yHGyFqQeoVLC/o0jqJMwL7Hm9Shfc VaUiKFqjDnPmUbHrlLsHM79ew0PR31oSpkHZWz3hEU9UVWgrIdHFVhIrbbS9w43m w1W2j6Lbfta18zL43m2VUG81RppGMum02QEkuQeU8RUA9CaBKbLKCPw7TVNcSe9M = 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 :message-id:date:from:mime-version:to:cc:subject:content-type; s=default; bh=dwuQrA+d3oy/JQKgYv103p0vYuw=; b=giaT1EtyEqA+g6qLY eEtprsQrjMtb/vz+hH+BAHvo7dtpLKLQJOptBVnEpxk+tuOci8MVciokiHepMU25 DCrk9m6BgqrkJft/J/Rh5DqIeVZT6h7YA5jT3+eggk9Yq524J0a1aTPvr13VlXyE PppOnetECFm9WL12Z8q1MANHqc= Received: (qmail 25974 invoked by alias); 21 May 2014 12:24:03 -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 25948 invoked by uid 89); 21 May 2014 12:24:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: einhorn.in-berlin.de Received: from einhorn.in-berlin.de (HELO einhorn.in-berlin.de) (192.109.42.8) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 21 May 2014 12:24:00 +0000 X-Envelope-From: doko@ubuntu.com Received: from [192.168.42.220] (dslb-088-073-111-083.pools.arcor-ip.net [88.73.111.83]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id s4LCNtAU022219 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Wed, 21 May 2014 14:23:56 +0200 Message-ID: <537C9AC0.1020402@ubuntu.com> Date: Wed, 21 May 2014 14:23:28 +0200 From: Matthias Klose User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 MIME-Version: 1.0 To: GCC Patches CC: Christian Bruel Subject: [patch] check that sys/sdt.h can be used with the target The HAVE_SYS_SDT_H define succeeds when the file sys/sdt.h is found. It doesn't use the target compiler for that check, like AC_CHECK_HEADER does. This patch uses AC_COMPILE to check for the header and ensure that a dummy program succeeds to build. This is a different patch than the one proposed at https://gcc.gnu.org/ml/gcc-patches/2012-12/msg01122.html I think the conditional with the file check can be removed too, kept it for now. Ok for the trunk? Matthias PR other/61257 * configure.ac: Build a test program before defining HAVE_SYS_SDT_H. * configure: Regenerate. Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 210677) +++ gcc/configure.ac (working copy) @@ -4971,9 +4971,13 @@ 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]) + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include ]], + [[DTRACE_PROBE(foo,bar); return 0;]]) + ],[ + 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)