From patchwork Tue Apr 15 08:49:44 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 553 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 6F41C360072 for ; Tue, 15 Apr 2014 01:49:05 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id 183BB41092566; Tue, 15 Apr 2014 01:49:05 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.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-mx20.g.dreamhost.com (Postfix) with ESMTPS id D62EC410B5F36 for ; Tue, 15 Apr 2014 01:49:04 -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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=iPft +xHM346BBH8MdNOaqvYj6r+n/3XGcFMrYAJ9xwotC4oLhQSHxhDExOFBT5sAAtnT w6O4htfYkvhG1GEgREb/7UYPIwZeRGo3SNco+ZU2UzCGNNUmPrHO4l5Zchrx49eW EqplRvbh1V2bYMLpQCxcm0HLiJVOBbQZbo1Ng/E= 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:date:from:to:cc:subject:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=MrbG26b9UV wijuazyrjoXuQsAzo=; b=wKsNv3oZ2yI40jzVDX63yoZH/8YRk75a8P2Y6V99EG iXgXtFnKKjy8pLCRAx/sk7EU6eWuzGl7CO4T+imazi9wkcQGenOhvXer2HoFWR8O T2dB35MoKWSWGcAqvS+FPRIoR1CuiC8X+Ez7jP05GKpbQU2UPL47dwSBX+7kg2vH o= Received: (qmail 29923 invoked by alias); 15 Apr 2014 08:49:02 -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 29914 invoked by uid 89); 15 Apr 2014 08:49:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Date: Tue, 15 Apr 2014 14:19:44 +0530 From: Siddhesh Poyarekar To: Andreas Schwab Cc: libc-alpha@sourceware.org Subject: Re: [PATCH] benchtests: Link against objects in build directory Message-ID: <20140415084944.GM11072@spoyarek.pnq.redhat.com> References: <20140415070305.GA8521@spoyarek.pnq.redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1-rc1 (2013-10-16) X-DH-Original-To: glibc@patchwork.siddhesh.in On Tue, Apr 15, 2014 at 09:47:33AM +0200, Andreas Schwab wrote: > Siddhesh Poyarekar writes: > > > +LDLIBS-bench-acos = $(objpfx)$(..)math/libm.so > > This should be $(common-objpfx)math/libm.so or > $(common-objpfx)math/libm.a, depending on $(build-shared). Also, you > shouldn't use LDLIBS for built libraries, instead add it to the > dependency list of the binaries, where $(+link) will pick it up. > > See the use of link-libm in stdlib/Makefile, for example. Thanks, here's an updated patch. How does this look? Siddhesh * benchtests/Makefile: Depend on libraries in build directory. (bench-math): Separate out math tests. (bench-pthread): Separate out pthread tests. (bench): Include math and pthread tests. diff --git a/benchtests/Makefile b/benchtests/Makefile index 4989794..a0954cd 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -22,8 +22,12 @@ subdir := benchtests include ../Makeconfig -bench := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \ - log log2 modf pow pthread_once rint sin sincos sinh sqrt tan tanh +bench-math := acos acosh asin asinh atan atanh cos cosh exp exp2 ffs ffsll \ + log log2 modf pow rint sin sincos sinh sqrt tan tanh + +bench-pthread := pthread_once + +bench := $(bench-math) $(bench-pthread) # String function benchmarks. string-bench := bcopy bzero memccpy memchr memcmp memcpy memmem memmove \ @@ -40,27 +44,9 @@ benchset := $(string-bench-all) $(stdlib-bench) CFLAGS-bench-ffs.c += -fno-builtin CFLAGS-bench-ffsll.c += -fno-builtin -LDLIBS-bench-acos = -lm -LDLIBS-bench-acosh = -lm -LDLIBS-bench-asin = -lm -LDLIBS-bench-asinh = -lm -LDLIBS-bench-atan = -lm -LDLIBS-bench-atanh = -lm -LDLIBS-bench-cos = -lm -LDLIBS-bench-cosh = -lm -LDLIBS-bench-exp = -lm -LDLIBS-bench-exp2 = -lm -LDLIBS-bench-log = -lm -LDLIBS-bench-log2 = -lm -LDLIBS-bench-pow = -lm -LDLIBS-bench-pthread_once = -lpthread -LDLIBS-bench-rint = -lm -LDLIBS-bench-sin = -lm -LDLIBS-bench-sinh = -lm -LDLIBS-bench-sqrt = -lm -LDLIBS-bench-tan = -lm -LDLIBS-bench-tanh = -lm -LDLIBS-bench-sincos = -lm +$(addprefix $(objpfx)bench-,$(bench-math)): $(common-objpfx)math/libm.so +$(addprefix $(objpfx)bench-,$(bench-pthread)): \ + $(common-objpfx)nptl/libpthread.so