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: 343022 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 CBEC1140133 for ; Sat, 26 Apr 2014 08:53:58 +1000 (EST) 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=txHMB zhdcMKEhhMfFKq/D2v3YiQW04PbCVJmEZQ8zKN3NxrMbnG9WYW7jlpH/89Wxj6Ej kTx6uQlZyBJCkj663kfWx83nM34s6YW6XklTVffJK+lHRarl17PDA4SgK6RyFglH u/1GDJYNzJLrPCLoGRQR7SH2ffjsZt8OR+OVzo= 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=puUJFWfGxE3AYiLOrHzLOg3yHrzhhIJEvtsuG1ZuA9b EwzfiZowGOkX3phmtuLuvi1EJYP7kgzbBjWO1RZoJSo050o7vJPdtJB/gf0sqqoK 3PuWyBf9EQNN4bIKfhGeQKJxN93g5lof/B0ldpR+PkaJGw4kTiyceydviw0U2Lz4 = 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: 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)