From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: linux-arch@vger.kernel.org
Cc: Alexey Brodkin <Alexey.Brodkin@synopsys.com>,
Vineet Gupta <Vineet.Gupta1@synopsys.com>,
Aaro Koskinen <aaro.koskinen@nokia.com>,
Jiri Olsa <jolsa@kernel.org>, Paul Mackerras <paulus@samba.org>,
Peter Zijlstra <a.p.zijlstra@chello.nl>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] Revert "perf tools: Allow to specify custom linker command"
Date: Mon, 13 Jul 2015 14:10:53 +0300 [thread overview]
Message-ID: <1436785853-4260-1-git-send-email-abrodkin@synopsys.com> (raw)
This reverts commit 5ef7bbb09f7b
("perf tools: Allow to specify custom linker command").
LD is a pre-defined variable in GNU Make. I.e. it is always defined.
Which means there's no point to check "LD ?= ..." because it will never
succeed. And so LD will be either that explicitly passed to make like
this:
------->8-------
make LD=path_to_my_ld ...
------->8-------
or default value, which is host's "ld".
Latter leads to failure of cross-linkage because instead of cross linker
"$(CROSS_COMPILE)ld" host's "ld" is used.
As for commit which is reverted here:
[1] Usually for selection of non-default flavour of CPU core/options
linker flags are used like "-mtune=xxx" or "-mMyCPUType" etc.
[2] Still to implement ability to use "ld" that differs from
"$(CROSS_COMPILE)ld" one will need to add new makefile variable like
TARGET_LD and then check if $(TARGET_LD) is not specified on make
invocation then use "$(CROSS_COMPILE)ld".
But for now to fix cross-building of perf this revert is enough.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Aaro Koskinen <aaro.koskinen@nokia.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: linux-kernel@vger.kernel.org
---
tools/perf/Makefile.perf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/Makefile.perf b/tools/perf/Makefile.perf
index 7a4b549..0e0938a 100644
--- a/tools/perf/Makefile.perf
+++ b/tools/perf/Makefile.perf
@@ -110,7 +110,7 @@ $(OUTPUT)PERF-VERSION-FILE: ../../.git/HEAD
$(Q)touch $(OUTPUT)PERF-VERSION-FILE
CC = $(CROSS_COMPILE)gcc
-LD ?= $(CROSS_COMPILE)ld
+LD = $(CROSS_COMPILE)ld
AR = $(CROSS_COMPILE)ar
PKG_CONFIG = $(CROSS_COMPILE)pkg-config
--
2.4.3
next reply other threads:[~2015-07-13 11:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-13 11:10 Alexey Brodkin [this message]
2015-07-13 20:24 ` [PATCH] Revert "perf tools: Allow to specify custom linker command" Aaro Koskinen
2015-07-13 20:24 ` Aaro Koskinen
2015-07-14 6:31 ` Jiri Olsa
2015-07-14 9:05 ` [PATCH] perf tools: Really allow to specify custom CC, AR or LD Alexey Brodkin
2015-07-14 13:46 ` [PATCH] Revert "perf tools: Allow to specify custom linker command" Arnaldo Carvalho de Melo
2015-07-14 14:00 ` Alexey Brodkin
2015-07-14 14:45 ` acme
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436785853-4260-1-git-send-email-abrodkin@synopsys.com \
--to=alexey.brodkin@synopsys.com \
--cc=Vineet.Gupta1@synopsys.com \
--cc=a.p.zijlstra@chello.nl \
--cc=aaro.koskinen@nokia.com \
--cc=acme@redhat.com \
--cc=jolsa@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox