From patchwork Wed Apr 24 12:29:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1090109 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-101588-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="r1yY/nTN"; dkim-atps=neutral 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 44q0592dCgz9s71 for ; Wed, 24 Apr 2019 22:30:04 +1000 (AEST) 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:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=Gjn qwadG1MehkHGhrs/BhS29coQPjsUuEjbQhawelmutt5a568UWJIVemRLw+D47cCD FaeosEbbXMH5+J6O1Rba7alIMEmP+xWhHTt197VbxpiKiX1WUzCUIGjdR+jiAYSO SJdr9+EVTbovNfcpZtyltyytYblhopj1Lg8ijYCU= 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:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=4oXVUccWO 4zqkUou7N8j9WUi4W8=; b=r1yY/nTNGBVyyBVQYTTesAMnxwjhebsZKq62mYWqd jZQZegF628k49+5JVj96jiZa1Keq2kOnqxIoP1e3Eoln3okLWUKxUNLO9NiChMvY f99MSDKHiewYqK6E3DDa15wxr7CUj18pb4sR3CBUx5clRyd4EvKUJwVqD+B1Nflo ok= Received: (qmail 115913 invoked by alias); 24 Apr 2019 12:29:59 -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 115647 invoked by uid 89); 24 Apr 2019 12:29:58 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=honor, bench, LDFLAGS, ldflags X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] benchtests: Enable BIND_NOW if configured with --enable-bind-now Date: Wed, 24 Apr 2019 14:29:54 +0200 Message-ID: <87zhofmvr1.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Benchmarks should reflect distribution build policies, so it makes sense to honor the BIND_NOW configuration for them. This commit keeps using $(+link-tests), so that the benchmarks are linked according to the --enable-hardcoded-path-in-tests configure option. 2019-04-24 Florian Weimer benchtests: Enable BIND_NOW if configured with --enable-bind-now. * benchtests/Makefile [$(bind-now)] (link-bench-bind-now): Set. (bench-link-targets): New variable. ($(binaries-bench) …): Use it. Set LDFLAGS accordingly. Reviewed-by: Carlos O'Donell diff --git a/benchtests/Makefile b/benchtests/Makefile index cdc89488d6..d294bbbb7e 100644 --- a/benchtests/Makefile +++ b/benchtests/Makefile @@ -236,13 +236,21 @@ bench-func: $(binaries-bench) scripts/benchout.schema.json; \ fi -$(timing-type) $(binaries-bench) $(binaries-benchset) \ - $(binaries-bench-malloc): %: %.o $(objpfx)json-lib.o \ +ifeq ($(bind-now),yes) +link-bench-bind-now = -Wl,-z,now +endif + +bench-link-targets = $(timing-type) $(binaries-bench) $(binaries-benchset) \ + $(binaries-bench-malloc) + +$(bench-link-targets): %: %.o $(objpfx)json-lib.o \ $(link-extra-libs-tests) \ $(sort $(filter $(common-objpfx)lib%,$(link-libc))) \ $(addprefix $(csu-objpfx),start.o) $(+preinit) $(+postinit) $(+link-tests) +$(bench-link-targets): LDFLAGS += $(link-bench-bind-now) + $(objpfx)bench-%.c: %-inputs $(bench-deps) { if [ -n "$($*-INCLUDE)" ]; then \ cat $($*-INCLUDE); \