0011-aarch64-Fix-include-paths-when-S-B.patch 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. From b7ce05b2d969b311c6061bda32c3117c76bf7e0c Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Tue, 31 Jan 2023 22:03:38 -0800
  4. Subject: [PATCH] aarch64: Fix include paths when S != B
  5. aarch64.h gets copied into build directory when built out of tree, in
  6. this case build uses this file but does not find the includes inside it
  7. since they are not found in any of include paths specified in compiler
  8. cmdline.
  9. Fixes build errors like
  10. % g++ -c -isystem/mnt/b/yoe/master/build/tmp/work/x86_64-linux/gcc-cross-aarch64/13.0.1-r0/recipe-sysroot-native/usr/include -O2 -pipe -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Wconditionally-supported -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -Ibuild -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/build -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../include -I../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/../libcpp/include -o build/gencheck.o ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc
  11. In file included from ./tm.h:34,
  12. from ../../../../../../../work-shared/gcc-13.0.1-r0/gcc-b2ec2504af77b35e748067eeb846821d12a6b6b4/gcc/gencheck.cc:23:
  13. ./config/aarch64/aarch64.h:164:10: fatal error: aarch64-option-extensions.def: No such file or directory
  14. 164 | #include "aarch64-option-extensions.def"
  15. | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  16. compilation terminated.
  17. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105144
  18. Upstream-Status: Pending
  19. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  20. ---
  21. gcc/config/aarch64/aarch64.h | 8 ++++----
  22. 1 file changed, 4 insertions(+), 4 deletions(-)
  23. diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
  24. index 73b09e20508..10ea3672f20 100644
  25. --- a/gcc/config/aarch64/aarch64.h
  26. +++ b/gcc/config/aarch64/aarch64.h
  27. @@ -161,8 +161,8 @@
  28. enum class aarch64_feature : unsigned char {
  29. #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) IDENT,
  30. #define AARCH64_ARCH(A, B, IDENT, D, E) IDENT,
  31. -#include "aarch64-option-extensions.def"
  32. -#include "aarch64-arches.def"
  33. +#include "config/aarch64/aarch64-option-extensions.def"
  34. +#include "config/aarch64/aarch64-arches.def"
  35. };
  36. /* Define unique flags for each of the above. */
  37. @@ -171,8 +171,8 @@ enum class aarch64_feature : unsigned char {
  38. = aarch64_feature_flags (1) << int (aarch64_feature::IDENT);
  39. #define AARCH64_OPT_EXTENSION(A, IDENT, C, D, E, F) HANDLE (IDENT)
  40. #define AARCH64_ARCH(A, B, IDENT, D, E) HANDLE (IDENT)
  41. -#include "aarch64-option-extensions.def"
  42. -#include "aarch64-arches.def"
  43. +#include "config/aarch64/aarch64-option-extensions.def"
  44. +#include "config/aarch64/aarch64-arches.def"
  45. #undef HANDLE
  46. #endif