From patchwork Fri Mar 6 09:43:06 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baruch Siach X-Patchwork-Id: 447079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 1D8951400EA for ; Fri, 6 Mar 2015 20:43:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1957592212; Fri, 6 Mar 2015 09:43:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3hL6AgV1GW+j; Fri, 6 Mar 2015 09:43:34 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 2F8869211A; Fri, 6 Mar 2015 09:43:34 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 5B5E21C11D3 for ; Fri, 6 Mar 2015 09:43:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 587469211A for ; Fri, 6 Mar 2015 09:43:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id juytwBAVdmod for ; Fri, 6 Mar 2015 09:43:32 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mx.tkos.co.il (guitar.tcltek.co.il [192.115.133.116]) by whitealder.osuosl.org (Postfix) with ESMTPS id 86C7A91F0C for ; Fri, 6 Mar 2015 09:43:32 +0000 (UTC) Received: from tarshish.tkos.co.il (unknown [10.0.8.6]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mx.tkos.co.il (Postfix) with ESMTPSA id 55890440787; Fri, 6 Mar 2015 11:43:19 +0200 (IST) From: Baruch Siach To: buildroot@busybox.net Date: Fri, 6 Mar 2015 11:43:06 +0200 Message-Id: <0997c42f827ac8a01c0465654e89995c70d5f5a5.1425634986.git.baruch@tkos.co.il> X-Mailer: git-send-email 2.1.4 Subject: [Buildroot] [PATCH v3] lmbench: fix build with libtirpc X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" When linking with an external libtirpc, -ltirpc must come after lmbench.a in the linker command line. Use LDLIBS for that. Fixes: http://autobuild.buildroot.net/results/89e/89ee35561d3a49f38e9a747ed78a5846be4764c8/ http://autobuild.buildroot.net/results/409/4097b1c2585db2de517a8741174c02177aabee00/ and more. Signed-off-by: Baruch Siach Reviewed-by: Fabio Porcedda Tested-by: Fabio Porcedda --- v3: Edit scripts/build with sed instead of using a patch (Fabio Porcedda) v2: Rebase on current master (Fabio Porcedda) --- package/lmbench/lmbench.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk index 59e750c5892f..f593428ac1c8 100644 --- a/package/lmbench/lmbench.mk +++ b/package/lmbench/lmbench.mk @@ -11,24 +11,27 @@ LMBENCH_LICENSE = lmbench license (based on GPLv2) LMBENCH_LICENSE_FILES = COPYING COPYING-2 LMBENCH_CFLAGS = $(TARGET_CFLAGS) -LMBENCH_LDLIBS = $(TARGET_LDFLAGS) ifeq ($(BR2_PACKAGE_LIBTIRPC),y) LMBENCH_DEPENDENCIES += host-pkgconf libtirpc LMBENCH_CFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --cflags libtirpc) -LMBENCH_LDFLAGS += $(shell $(PKG_CONFIG_HOST_BINARY) --libs libtirpc) +LMBENCH_LDLIBS = $(shell $(PKG_CONFIG_HOST_BINARY) --libs libtirpc) endif define LMBENCH_CONFIGURE_CMDS $(call CONFIG_UPDATE,$(@D)) sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile + sed -i 's/LDLIBS=/LDLIBS+=/g' $(@D)/scripts/build sed -i '/cd .*doc/d' $(@D)/src/Makefile sed -i '/include/d' $(@D)/src/Makefile touch $@ endef +# Note: there is a second stage 'make' invocation from the 'scripts/build' +# script. So the variables override below don't take direct effect in +# src/Makefile. define LMBENCH_BUILD_CMDS - $(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDFLAGS="$(LMBENCH_LDFLAGS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src + $(MAKE) CFLAGS="$(LMBENCH_CFLAGS)" LDLIBS="$(LMBENCH_LDLIBS)" OS=$(ARCH) CC="$(TARGET_CC)" -C $(@D)/src endef define LMBENCH_INSTALL_TARGET_CMDS