From patchwork Thu Mar 2 16:46:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Toma Tabacu X-Patchwork-Id: 734675 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 3vYys84F05z9s7p for ; Fri, 3 Mar 2017 03:47:07 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="EFGVolym"; 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:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=IeQiUPPZks/+FniJOG1t1gCQs1iFB8abQM6cTkUW0Hh+/Yigs29di FsbcIKkYWcH4kwAzmlnqvLxAK2eZ4a6+PB7peFo4/m2hyh1ZNeckLq5/VM0E4/gL XBqLZ6iqeHEEvl97FpNxpH3YTgL7WbyF763RaPiRy8hf7K07fZjwDE= 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 :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=DZ8tsCT1HO8Ygy9GBeqT3FOhwVc=; b=EFGVolymkplQwtj/J+O7y6JnSa3+ EMgMSFNW1r6N8DKT5XP8msFiXBlw81Gg4CrRd6tRosiHUR1eBJC0jMuRoBZIk78B KynsI9YSX2xB6It4/rh9p4naOY9UfMCBJnetgZzfKotUWF5vCRQ+LtKiMqhOKnyd cfNwkpxiNJpKVXg= Received: (qmail 46187 invoked by alias); 2 Mar 2017 16:46:56 -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 46178 invoked by uid 89); 2 Mar 2017 16:46:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:2524 X-HELO: mailapp01.imgtec.com Received: from mailapp01.imgtec.com (HELO mailapp01.imgtec.com) (195.59.15.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Mar 2017 16:46:54 +0000 Received: from hhmail02.hh.imgtec.org (unknown [10.100.10.20]) by Forcepoint Email with ESMTPS id 2EFA79138CA62; Thu, 2 Mar 2017 16:46:49 +0000 (GMT) Received: from HHMAIL-X.hh.imgtec.org (10.100.10.113) by hhmail02.hh.imgtec.org (10.100.10.20) with Microsoft SMTP Server (TLS) id 14.3.294.0; Thu, 2 Mar 2017 16:46:52 +0000 Received: from hhmail02.hh.imgtec.org ([fe80::5400:d33e:81a4:f775]) by HHMAIL-X.hh.imgtec.org ([fe80::3509:b0ce:371:2b%18]) with mapi id 14.03.0294.000; Thu, 2 Mar 2017 16:46:51 +0000 From: Toma Tabacu To: Rainer Orth CC: "Moore, Catherine" , "gcc-patches@gcc.gnu.org" , Matthew Fortune Subject: RE: [PATCH, testsuite] Skip gcc.dg/lto/pr60449_0.c for mips*-*-elf* targets. Date: Thu, 2 Mar 2017 16:46:51 +0000 Message-ID: References: <9ff301a4a1184abca09bc11af2cf2e16@SVR-ORW-MBX-04.mgc.mentorg.com> In-Reply-To: MIME-Version: 1.0 X-IsSubscribed: yes Hi, > From: Rainer Orth > > > > gcc/testsuite/ > > > > * gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for > > gettimeofday. Remove dg-skip-if for AVR. > > Two spaces after period. > Fixed. > > * lib/target-supports.exp (check_effective_target_gettimeofday): New. > > Better say "New proc." or something like this. > Fixed. > > Thanks for your patience. > > Rainer No problem. Thanks for the review. Below is the version with the updated ChangeLog entries. Catherine, Matthew, what do you think ? Regards, Toma gcc/ * doc/sourcebuild.texi (Effective-Target Keywords, Environment attributes): Document gettimeofday. gcc/testsuite/ * gcc.dg/lto/pr60449_0.c: Add dg-require-effective-target for gettimeofday. Remove dg-skip-if for AVR. * lib/target-supports.exp (check_effective_target_gettimeofday): New proc. diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index 0dc4348..da17ff6 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -1914,6 +1914,9 @@ Target is @samp{freestanding} as defined in section 4 of the C99 standard. Effectively, it is a target which supports no extra headers or libraries other than what is considered essential. +@item gettimeofday +Target supports @code{gettimeofday}. + @item init_priority Target supports constructors with initialization priority arguments. diff --git a/gcc/testsuite/gcc.dg/lto/pr60449_0.c b/gcc/testsuite/gcc.dg/lto/pr60449_0.c index 5b878a6..e6c3166 100644 --- a/gcc/testsuite/gcc.dg/lto/pr60449_0.c +++ b/gcc/testsuite/gcc.dg/lto/pr60449_0.c @@ -1,5 +1,5 @@ /* { dg-lto-do link } */ -/* { dg-skip-if "Needs gettimeofday" { "avr-*-*" } } */ +/* { dg-require-effective-target gettimeofday } */ extern int printf (const char *__restrict __format, ...); typedef long int __time_t; diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 2766af4..d1639dc 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -968,6 +968,11 @@ proc check_effective_target_setrlimit {} { return [check_function_available "setrlimit"] } +# Return 1 if the target supports gettimeofday, 0 otherwise. +proc check_effective_target_gettimeofday {} { + return [check_function_available "gettimeofday"] +} + # Return 1 if the target supports swapcontext, 0 otherwise. proc check_effective_target_swapcontext {} { return [check_no_compiler_messages swapcontext executable {