From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42009 invoked by alias); 27 Sep 2018 20:31:38 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 41960 invoked by uid 89); 27 Sep 2018 20:31:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=H*F:U*tom X-HELO: gateway22.websitewelcome.com Received: from gateway22.websitewelcome.com (HELO gateway22.websitewelcome.com) (192.185.47.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 27 Sep 2018 20:31:35 +0000 Received: from cm15.websitewelcome.com (cm15.websitewelcome.com [100.42.49.9]) by gateway22.websitewelcome.com (Postfix) with ESMTP id 7DC2813DD5 for ; Thu, 27 Sep 2018 15:31:34 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id 5cw8gU8Tk8YaU5cwTgy0DV; Thu, 27 Sep 2018 15:31:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=k2zZTnXbmtILvN+oFhWcs/Ur9Cs1NcppqpvXnwkWufo=; b=BJft+DfHE4e+Tg/Qx6uI+xeXkF 206IpdBDf4LOODYs0UIJKSycTY4K2E54m2GWk7RgcOvpyXU4SS+27AMJGNTjjrRBCmcxXLU2uM1MZ Ib4iu021GP2IJu7LQDsFWN+OO; Received: from 97-122-190-66.hlrn.qwest.net ([97.122.190.66]:37324 helo=pokyo) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1g5cw8-00402I-An; Thu, 27 Sep 2018 15:31:00 -0500 From: Tom Tromey To: Sandra Loosemore Cc: Rainer Orth , "gdb-patches\@sourceware.org" Subject: Re: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails References: <0416cc5d-337b-82ae-5f37-07f28eaa35b3@codesourcery.com> Date: Thu, 27 Sep 2018 20:31:00 -0000 In-Reply-To: (Sandra Loosemore's message of "Wed, 26 Sep 2018 20:20:10 -0600") Message-ID: <877ej6of7g.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-09/txt/msg00880.txt.bz2 >>>>> "Sandra" == Sandra Loosemore writes: Sandra> Here's a revised patch that adapts the same compile test that gcc Sandra> uses. Is this one OK? Thanks for the patch. Sandra> +# Return true if the IFUNC feature is unsupported. Sandra> +gdb_caching_proc skip_ifunc_tests { Sandra> + # Set up, compile, and execute a test program. Sandra> + # Include the current process ID in the file names to prevent conflicts Sandra> + # with invocations for multiple testsuites. Sandra> + set src [standard_temp_file ifunc[pid].c] Sandra> + set obj [standard_temp_file ifunc[pid].o] Sandra> + Sandra> + verbose -log "checking for ifunc support" Sandra> + gdb_produce_source $src { Sandra> + extern void f_ (); Sandra> + typedef void F (void); Sandra> + F* g (void) { return &f_; } Sandra> + void f () __attribute__ ((ifunc ("g"))); Sandra> + } Sandra> + Sandra> + set lines [gdb_compile $src $obj object {quiet}] Sandra> + file delete $src Sandra> + file delete $obj I wonder whether this could use gdb_can_simple_compile. A recent patch changed a bunch of other caching procs to use this helper function instead. I didn't examine it in detail, though, so if there is some reason it can't be used, that's fine. But if it can be used, this is ok with that change. Tom