From patchwork Fri Apr 25 22:53:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steve Ellcey X-Patchwork-Id: 687 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 6FF7E360060 for ; Fri, 25 Apr 2014 15:53:56 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14307373) id F0B384F93E0F; Fri, 25 Apr 2014 15:53:55 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx22.g.dreamhost.com 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 homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id C45FD4F91FA6 for ; Fri, 25 Apr 2014 15:53:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; q=dns; s=default; b=RuHFV CYXn2h0ceYT/rv8BsSUAGqSkwCUMWGjaHB23k3ylI9UuW+GxTkxtJwqdMMy6IixO 0YWeJ1E4YBskHF8VREAWGJPX5RlViqsJ3o0yd3sK+d8OwEzeHO5bigzoKHg+cjb6 tcsxJUQGlu3Z/ljsdz2d7TSuuDXbrBusgH8b6k= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:date:to:subject:mime-version:content-type :content-transfer-encoding:message-id; s=default; bh=UC8x6qRYxUt TFQRA5yaNUWltUyA=; b=rTIbKFtmUwvtVVDOGbCkXOrrt4Xtaa7MlFGFkUxVJ5Y BKahZG7koq7O0Qo4RUjFVJSjhIWtuAQGkscDet1J4de6o21Imo7YNZP4xMQlt8/c l08XgNmsvTAn52vYwllNBkNonEZp6SG256UpjJPUgCMoCBNAMmjRccaZ6wiJrkzk = Received: (qmail 31220 invoked by alias); 25 Apr 2014 22:53:52 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 31208 invoked by uid 89); 25 Apr 2014 22:53:52 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mailapp01.imgtec.com From: "Steve Ellcey " Date: Fri, 25 Apr 2014 15:53:43 -0700 To: Subject: [Patch] Fix HP_SMALL_TIMING_AVAIL undef warnings User-Agent: Heirloom mailx 12.5 6/20/10 MIME-Version: 1.0 Message-ID: X-DH-Original-To: glibc@patchwork.siddhesh.in Here is my attempt to fix some of the undef warnings (those for HP_SMALL_TIMING_AVAIL). Does this look like the right way to fix this? At the risk of opening a can of worms, do we want to change the name of this macro to match the other HP_TIMING_* macros in this section? I tested this on my MIPS machine and all the object files remained the same except for nscd/nscd_stat.o (has a date stamp in it) and rt/get_clockfreq.o (line number change in debug info due to the extra line in sysdeps/generic/hp-timing.h). It might be good if an alpha maintainer could check this since that is the only target that defines HP_SMALL_TIMING_AVAIL. OK to check in? 2014-04-25 Steve Ellcey * sysdeps/generic/hp-timing.h (HP_SMALL_TIMING_AVAIL): Set default value. * elf/dl-support.c: Use #if to check HP_SMALL_TIMING_AVAIL. * elf/rtld.c: Ditto. diff --git a/elf/dl-support.c b/elf/dl-support.c index e435436..e9cfa64 100644 --- a/elf/dl-support.c +++ b/elf/dl-support.c @@ -130,7 +130,7 @@ void *_dl_random; #include /* We expect less than a second for relocation. */ -#ifdef HP_SMALL_TIMING_AVAIL +#if HP_SMALL_TIMING_AVAIL # undef HP_TIMING_AVAIL # define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL #endif diff --git a/elf/rtld.c b/elf/rtld.c index 9d121dc..5dcb61a 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -196,7 +196,7 @@ static struct libname_list _dl_rtld_libname; static struct libname_list _dl_rtld_libname2; /* We expect less than a second for relocation. */ -#ifdef HP_SMALL_TIMING_AVAIL +#if HP_SMALL_TIMING_AVAIL # undef HP_TIMING_AVAIL # define HP_TIMING_AVAIL HP_SMALL_TIMING_AVAIL #endif diff --git a/sysdeps/generic/hp-timing.h b/sysdeps/generic/hp-timing.h index eddc971..775495d 100644 --- a/sysdeps/generic/hp-timing.h +++ b/sysdeps/generic/hp-timing.h @@ -30,6 +30,8 @@ - HP_TIMING_AVAIL: test for availability. + - HP_SMALL_TIMING_AVAIL: test for availability. + - HP_TIMING_INLINE: this macro is non-zero if the functionality is not implemented using function calls but instead uses some inlined code which might simply consist of a few assembler instructions. We have to @@ -66,6 +68,7 @@ /* Provide dummy definitions. */ #define HP_TIMING_AVAIL (0) +#define HP_SMALL_TIMING_AVAIL (0) #define HP_TIMING_INLINE (0) typedef int hp_timing_t; #define HP_TIMING_ZERO(Var)