Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1182734 > unrolled thread
| Started by | Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
|---|---|
| First post | 2015-07-13 13:20 +0200 |
| Last post | 2015-07-14 16:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] Revert "perf tools: Allow to specify custom linker command" Alexey Brodkin <Alexey.Brodkin@synopsys.com> - 2015-07-13 13:20 +0200
Re: [PATCH] Revert "perf tools: Allow to specify custom linker command" "acme@kernel.org" <acme@kernel.org> - 2015-07-14 16:50 +0200
| From | Alexey Brodkin <Alexey.Brodkin@synopsys.com> |
|---|---|
| Date | 2015-07-13 13:20 +0200 |
| Subject | [PATCH] Revert "perf tools: Allow to specify custom linker command" |
| Message-ID | <pLJWa-4m6-31@gated-at.bofh.it> |
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "acme@kernel.org" <acme@kernel.org> |
|---|---|
| Date | 2015-07-14 16:50 +0200 |
| Subject | Re: [PATCH] Revert "perf tools: Allow to specify custom linker command" |
| Message-ID | <pM9GW-3no-7@gated-at.bofh.it> |
| In reply to | #1182734 |
Em Tue, Jul 14, 2015 at 02:00:05PM +0000, Alexey Brodkin escreveu: > On Tue, 2015-07-14 at 10:46 -0300, Arnaldo Carvalho de Melo wrote: > > Em Mon, Jul 13, 2015 at 11:24:06PM +0300, Aaro Koskinen escreveu: > > > > But for now to fix cross-building of perf this revert is enough. > > > Hmm. You are probably right, my build system always exports LD with > > > correct linker for cross builds so perhaps that's why I this "worked" > > > for me when testing. Sorry. > > So, I think this is an "Acked-by: Aaro Koskinen <aaro.koskinen@iki.fi>" > > for the revert, right? > > > I guess the correct fix would be [1], i.e. there should be some new > > > variable to pass flags to ld command. > > > Or maybe [2], could we use make "origin" function? If LD is "default", > > > then use "$(CROSS_COMPILE)ld", otherwise use what the user passed? > > When you guys get to some conclusion, please submit a new patch, for now > > I am taking the revert with the (implied) Acked-by Aaro, ok? > Please find my patch that both reverts initial Aaro's patch and implements > proper handling of CC, AR and LD substitution here - https://lkml.org/lkml/2015/7/14/149 I saw it, will do. - Arnaldo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web