2
1

0003-fix-toolchain-paths.patch 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. From ca175ef5bf7f96db57fb5aa562602dc424fab81c Mon Sep 17 00:00:00 2001
  2. From: Joel Winarske <joel.winarsk@gmail.com>
  3. Date: Sun, 5 Mar 2023 10:43:02 -0800
  4. Subject: [PATCH] fix toolchain paths
  5. Flutter includes a copy of clang which is required to build. However, by
  6. default, build/toolchain/custom/BUILD.gn attempts to use several gcc utilities
  7. such as ar, readelf, nm, and strip. Change these to the proper llvm provided
  8. utility.
  9. Upstream: https://github.com/flutter/flutter/issues/123073
  10. Signed-off-by: Joel Winarske <joel.winarsk@gmail.com>
  11. Signed-off-by: Adam Duskett <adam.duskett@amarulasolutions.com>
  12. ---
  13. build/toolchain/custom/BUILD.gn | 4 +++++------
  14. 1 file changed, 5 insertions(+), 6 deletions(-)
  15. diff --git a/build/toolchain/custom/BUILD.gn b/build/toolchain/custom/BUILD.gn
  16. index 65b1623..8b3f6f8 100644
  17. --- a/build/toolchain/custom/BUILD.gn
  18. +++ b/build/toolchain/custom/BUILD.gn
  19. @@ -12,11 +12,11 @@ toolchain("custom") {
  20. # these values in our scope.
  21. cc = "${toolchain_bin}/clang"
  22. cxx = "${toolchain_bin}/clang++"
  23. - ar = "${toolchain_bin}/${custom_target_triple}-ar"
  24. + ar = "${toolchain_bin}/llvm-ar"
  25. ld = "${toolchain_bin}/clang++"
  26. - readelf = "${toolchain_bin}/${custom_target_triple}-readelf"
  27. - nm = "${toolchain_bin}/${custom_target_triple}-nm"
  28. - strip = "${toolchain_bin}/${custom_target_triple}-strip"
  29. + readelf = "${toolchain_bin}/llvm-readelf"
  30. + nm = "${toolchain_bin}/llvm-nm"
  31. + strip = "${toolchain_bin}/llvm-strip"
  32. target_triple_flags = "--target=${custom_target_triple}"
  33. sysroot_flags = "--sysroot ${custom_sysroot}"
  34. --
  35. 2.39.2