Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1627866imu; Wed, 12 Dec 2018 01:13:40 -0800 (PST) X-Google-Smtp-Source: AFSGD/X4LNFWwp/5GZ/JgXwiJ0D4IUFjFe59vem5zWa1eX0NRgjLjGqMxUYvPfi1vb4zVawC6nZ/ X-Received: by 2002:a63:d301:: with SMTP id b1mr17842857pgg.61.1544606020889; Wed, 12 Dec 2018 01:13:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544606020; cv=none; d=google.com; s=arc-20160816; b=ZdiPsRbYuyF/66NNRS2U0CNVNRFyZX9vY2Z9RKF6Ch9YhudXGdgetOEy0AFWdG1Qqh 50x/AJwUUWcKwM9P8YJtuYBblPCSFPDbo1/x+ScRgPxrYtjhn44FuCzhsGx2ZbaljZNm xhmTh+t0PFj1lr5H6jUdXc6SNX1IwT7P3bdugAW1bqSCRSRaJYBdqMXa8Xnq9zz8UZOj 4d1kUMqJFl6l230PD52CPp5EoyI8b00c+8j5pEl4R+QgE8Rex7/vZZAF0RpmZ0ECpLC6 FsEKIjLYUKj36KRxlzIONiTS7BFd6gU32S4WyH8FYMaMbM3BBTj3PYWX3izoj5Y7ddRD cHfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=7YHe5xtzm2krcuLy8BfLLwCm02NdQrQLjSBP4jzu6Z8=; b=ETycRbLO/ttXexfRrOeSY343xAj8fTVIvGkr6AMlZguwuhoJBNKAWf0vqRqmqSrfBH PgSGICkqCd/ykZj7au5KRNMIeZ4SwjelXy/PnyqKsVw3ifJD23BX2k9cpBEdc+G6TBrO c+TZbmIgrpNTdj1l7rRllg6iEvbc26TRpxyTFbCmPIg0SUx9T2ZYjarlADCFddiy36WK Syu0gx1AAKlHtzsVjBCRqLgBCAwTP0SOFF7FnX5ygYf1GK3cmo+oylzWZYxu7LqyarZg OuWb4bQS7bxqy2YluQaSXXcb2vMyUZqhtwyn0Wupu1Yn0zHZBwuHBeP1KE0j3UwGdSKx 4c4A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 97si15192348ple.389.2018.12.12.01.13.25; Wed, 12 Dec 2018 01:13:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbeLLJMV (ORCPT + 99 others); Wed, 12 Dec 2018 04:12:21 -0500 Received: from mx1.redhat.com ([209.132.183.28]:57116 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbeLLJMV (ORCPT ); Wed, 12 Dec 2018 04:12:21 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id E9451308220F; Wed, 12 Dec 2018 09:12:20 +0000 (UTC) Received: from krava (unknown [10.43.17.30]) by smtp.corp.redhat.com (Postfix) with SMTP id EA78E5C26E; Wed, 12 Dec 2018 09:12:15 +0000 (UTC) Date: Wed, 12 Dec 2018 10:12:14 +0100 From: Jiri Olsa To: Arnaldo Carvalho de Melo Cc: Steven Rostedt , Jiri Olsa , lkml , Tzvetomir Stoyanov , "Herton R. Krzesinski" Subject: [PATCHv3 01/10] tools lib traceevent: Use LDFLAGS in the build commands Message-ID: <20181212091214.GC17489@krava> References: <20181016150614.21260-1-jolsa@kernel.org> <20181016150614.21260-2-jolsa@kernel.org> <20181016112136.3a72a452@gandalf.local.home> <20181016154526.GC6631@krava> <20181017102341.53412998@gandalf.local.home> <20181116130158.GA30583@krava> <20181122093006.GD15953@krava> <20181128135641.GD31608@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181128135641.GD31608@kernel.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Wed, 12 Dec 2018 09:12:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 28, 2018 at 10:56:41AM -0300, Arnaldo Carvalho de Melo wrote: SNIP > LD /tmp/build/perf/libtraceevent-in.o > MKDIR /tmp/build/perf/util/ > LINK /tmp/build/perf/libtraceevent.a > CC /tmp/build/perf/util/block-range.o > MKDIR /tmp/build/perf/arch/ > CC /tmp/build/perf/arch/common.o > LD /tmp/build/perf/plugin_mac80211-in.o > CC /tmp/build/perf/plugin_sched_switch.o > LD /tmp/build/perf/plugin_sched_switch-in.o > CC /tmp/build/perf/plugin_function.o > LD /tmp/build/perf/plugin_function-in.o > CC /tmp/build/perf/plugin_xen.o > MKDIR /tmp/build/perf/arch/arm/util/ > CC /tmp/build/perf/arch/arm/util/pmu.o > LD /tmp/build/perf/plugin_xen-in.o > CC /tmp/build/perf/plugin_scsi.o > CC /tmp/build/perf/plugin_cfg80211.o > LD /tmp/build/perf/plugin_scsi-in.o > LD /tmp/build/perf/plugin_cfg80211-in.o > MKDIR /tmp/build/perf/arch/arm/util/ > CC /tmp/build/perf/arch/arm/util/auxtrace.o > CC /tmp/build/perf/arch/arm/util/cs-etm.o > LINK /tmp/build/perf/plugin_jbd2.so > /opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lc > /opt/android-ndk-r12b/toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../arm-linux-androideabi/bin/ld: error: cannot find -ldl > collect2: error: ld returned 1 exit status > Makefile:196: recipe for target '/tmp/build/perf/plugin_jbd2.so' failed > make[3]: *** [/tmp/build/perf/plugin_jbd2.so] Error 1 > Makefile.perf:669: recipe for target 'libtraceevent_plugins' failed > make[2]: *** [libtraceevent_plugins] Error 2 > make[2]: *** Waiting for unfinished jobs.... > > SNIP > 1 59.08 alpine:3.4 : Ok gcc (Alpine 5.3.0) 5.3.0 > 2 68.75 alpine:3.5 : Ok gcc (Alpine 6.2.1) 6.2.1 20160822 > 3 79.67 alpine:3.6 : Ok gcc (Alpine 6.3.0) 6.3.0 > 4 48.69 alpine:3.7 : Ok gcc (Alpine 6.4.0) 6.4.0 > 5 46.89 alpine:3.8 : Ok gcc (Alpine 6.4.0) 6.4.0 > 6 46.46 alpine:edge : Ok gcc (Alpine 6.4.0) 6.4.0 > 7 38.46 amazonlinux:1 : Ok gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-28) > 8 44.69 amazonlinux:2 : Ok gcc (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) > 9 41.88 android-ndk:r12b-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) > 10 46.24 android-ndk:r15c-arm : Ok arm-linux-androideabi-gcc (GCC) 4.9.x 20150123 (prerelease) > 11 22.22 centos:5 : Ok gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-55) > 12 35.54 centos:6 : Ok gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-23) ok, I shouldn't have taken out the CFLAGS, some build scripts depends on it already attaching v2 thanks, jirka --- So user could specify outside LDFLAGS values. Keeping the CFLAGS in there as well, so we don't break existing script. Cc: Tzvetomir Stoyanov (VMware) Cc: Steven Rostedt Acked-by: Steven Rostedt (VMware) Signed-off-by: Jiri Olsa --- tools/lib/traceevent/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/lib/traceevent/Makefile b/tools/lib/traceevent/Makefile index 67fe5d7ef190..941761d9923d 100644 --- a/tools/lib/traceevent/Makefile +++ b/tools/lib/traceevent/Makefile @@ -177,7 +177,7 @@ $(TE_IN): force $(Q)$(MAKE) $(build)=libtraceevent $(OUTPUT)libtraceevent.so.$(EVENT_PARSE_VERSION): $(TE_IN) - $(QUIET_LINK)$(CC) --shared $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ + $(QUIET_LINK)$(CC) --shared $(LDFLAGS) $^ -Wl,-soname,libtraceevent.so.$(EP_VERSION) -o $@ @ln -sf $(@F) $(OUTPUT)libtraceevent.so @ln -sf $(@F) $(OUTPUT)libtraceevent.so.$(EP_VERSION) @@ -196,7 +196,7 @@ $(PLUGINS_IN): force $(Q)$(MAKE) $(build)=$(plugin_obj) $(OUTPUT)%.so: $(OUTPUT)%-in.o - $(QUIET_LINK)$(CC) $(CFLAGS) -shared -nostartfiles -o $@ $^ + $(QUIET_LINK)$(CC) $(CFLAGS) -shared $(LDFLAGS) -nostartfiles -o $@ $^ define make_version.h (echo '/* This file is automatically generated. Do not modify. */'; \ -- 2.17.2