0131-objtool-Fix-cross-build.patch 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. From 2a83e03f3415c542956fac4f7c43ea75a44aba1d Mon Sep 17 00:00:00 2001
  2. From: Josh Poimboeuf <[email protected]>
  3. Date: Tue, 7 Nov 2017 21:01:52 -0600
  4. Subject: [PATCH 131/231] objtool: Fix cross-build
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. CVE-2017-5754
  9. Stephen Rothwell reported this cross-compilation build failure:
  10. | In file included from orc_dump.c:19:0:
  11. | orc.h:21:10: fatal error: asm/orc_types.h: No such file or directory
  12. | ...
  13. Caused by:
  14. 6a77cff819ae ("objtool: Move synced files to their original relative locations")
  15. Use the proper arch header files location, not the host-arch location.
  16. Bisected-by: Stephen Rothwell <[email protected]>
  17. Reported-by: Stephen Rothwell <[email protected]>
  18. Signed-off-by: Josh Poimboeuf <[email protected]>
  19. Cc: Linus Torvalds <[email protected]>
  20. Cc: Linux-Next Mailing List <[email protected]>
  21. Cc: Peter Zijlstra <[email protected]>
  22. Cc: Thomas Gleixner <[email protected]>
  23. Link: http://lkml.kernel.org/r/20171108030152.bd76eahiwjwjt3kp@treble
  24. Signed-off-by: Ingo Molnar <[email protected]>
  25. (backported from commit 26bda786fb129698d96c9bc6d243f7a3cd3fc668)
  26. Signed-off-by: Andy Whitcroft <[email protected]>
  27. Signed-off-by: Kleber Sacilotto de Souza <[email protected]>
  28. (cherry picked from commit fbe7b2a70b2949ec3ba359c04fb60d8f31f74e04)
  29. Signed-off-by: Fabian Grünbichler <[email protected]>
  30. ---
  31. tools/objtool/Makefile | 2 +-
  32. 1 file changed, 1 insertion(+), 1 deletion(-)
  33. diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
  34. index 90b0241f3ccc..847e99aa54ea 100644
  35. --- a/tools/objtool/Makefile
  36. +++ b/tools/objtool/Makefile
  37. @@ -26,7 +26,7 @@ all: $(OBJTOOL)
  38. INCLUDES := -I$(srctree)/tools/include \
  39. -I$(srctree)/tools/arch/$(HOSTARCH)/include/uapi \
  40. - -I$(srctree)/tools/objtool/arch/$(HOSTARCH)/include
  41. + -I$(srctree)/tools/objtool/arch/$(ARCH)/include
  42. CFLAGS += -Wall -Werror $(EXTRA_WARNINGS) -Wno-switch-default -Wno-switch-enum -fomit-frame-pointer -O2 -g $(INCLUDES)
  43. LDFLAGS += -lelf $(LIBSUBCMD)
  44. --
  45. 2.14.2