linux-stable/tools/objtool
Nathan Chancellor e738fb38cf objtool: Allow AR to be overridden with HOSTAR
commit 8ea58f1e8b upstream.

Currently, this Makefile hardcodes GNU ar, meaning that if it is not
available, there is no way to supply a different one and the build will
fail.

  $ make AR=llvm-ar CC=clang LD=ld.lld HOSTAR=llvm-ar HOSTCC=clang \
         HOSTLD=ld.lld HOSTLDFLAGS=-fuse-ld=lld defconfig modules_prepare
  ...
    AR       /out/tools/objtool/libsubcmd.a
  /bin/sh: 1: ar: not found
  ...

Follow the logic of HOST{CC,LD} and allow the user to specify a
different ar tool via HOSTAR (which is used elsewhere in other
tools/ Makefiles).

Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Josh Poimboeuf <jpoimboe@redhat.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Reviewed-by: Mukesh Ojha <mojha@codeaurora.org>
Cc: <stable@vger.kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/80822a9353926c38fd7a152991c6292491a9d0e8.1558028966.git.jpoimboe@redhat.com
Link: https://github.com/ClangBuiltLinux/linux/issues/481
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-25 18:23:33 +02:00
..
Documentation x86/asm: Fix inline asm call constraints for Clang 2017-09-23 15:06:20 +02:00
arch/x86 x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
.gitignore objtool: Move synced files to their original relative locations 2017-11-07 10:48:23 +01:00
Build objtool: Add ORC unwind table generation 2017-07-18 10:57:43 +02:00
Makefile objtool: Allow AR to be overridden with HOSTAR 2019-05-25 18:23:33 +02:00
arch.h objtool: Assume unannotated UD2 instructions are dead ends 2017-07-28 08:33:32 +02:00
builtin-check.c objtool: Add module specific retpoline rules 2018-02-21 09:05:05 +01:00
builtin-orc.c objtool: Use existing global variables for options 2018-02-21 09:05:04 +01:00
builtin.h objtool: Add module specific retpoline rules 2018-02-21 09:05:05 +01:00
cfi.h objtool: Handle GCC stack pointer adjustment bug 2017-08-30 10:48:41 +02:00
check.c objtool: Fix function fallthrough detection 2019-05-22 07:37:35 +02:00
check.h x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
elf.c objtool: Fix segfault in .cold detection with -ffunction-sections 2018-12-17 09:24:33 +01:00
elf.h objtool: Support GCC 8's cold subfunctions 2018-05-14 10:20:53 +02:00
objtool.c objtool: Print top level commands on incorrect usage 2017-10-18 15:22:26 +02:00
orc.h objtool: Move synced files to their original relative locations 2017-11-07 10:48:23 +01:00
orc_dump.c x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
orc_gen.c x86/unwind/orc: Detect the end of the stack 2018-06-21 16:34:56 +02:00
special.c objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00
special.h
sync-check.sh objtool: Move kernel headers/code sync check to a script 2017-11-07 10:48:34 +01:00
warn.h objtool: Implement stack validation 2.0 2017-06-30 10:19:19 +02:00