Ver código fonte

Makefile: reset LD and AR environment variables

The goal is to fix the compilation of perf (from linux) when LD or AR
variables are inherited from the environment.
After the linux upstream commits 5ef7bbb09f7b ("perf tools: Allow to
specify custom linker command") and 3c71ba3f80bb ("perf tools: Really allow
to specify custom CC, AR or LD") CC, AR, and LD variables are not overridden
if they are inherited.

In case of a cross compilation, it results in an inconsistent state: CC is
overridden but not LD and AR.

Linux-patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=5ef7bbb09f7b
Linux-patch: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=3c71ba3f80bb

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Nicolas Dichtel 9 anos atrás
pai
commit
376737d99d
1 arquivos alterados com 2 adições e 0 exclusões
  1. 2 0
      Makefile

+ 2 - 0
Makefile

@@ -343,6 +343,8 @@ ifeq ($(BR2_HAVE_DOT_CONFIG),y)
 unexport CROSS_COMPILE
 unexport CROSS_COMPILE
 unexport ARCH
 unexport ARCH
 unexport CC
 unexport CC
+unexport LD
+unexport AR
 unexport CXX
 unexport CXX
 unexport CPP
 unexport CPP
 unexport RANLIB
 unexport RANLIB