0017-powerpc-Do-not-ask-compiler-for-finding-arch.patch 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. From 93c5b86fae5e42e148e5182466eb0ac26298159c Mon Sep 17 00:00:00 2001
  2. From: Khem Raj <raj.khem@gmail.com>
  3. Date: Fri, 7 Aug 2020 14:31:16 -0700
  4. Subject: [PATCH] powerpc: Do not ask compiler for finding arch
  5. This does not work well in cross compiling environments like OE
  6. and moreover it uses its own -mcpu/-march options via cflags
  7. Upstream-Status: Inappropriate [ OE-Specific]
  8. Signed-off-by: Khem Raj <raj.khem@gmail.com>
  9. ---
  10. sysdeps/powerpc/preconfigure | 5 +----
  11. sysdeps/powerpc/preconfigure.ac | 5 +----
  12. 2 files changed, 2 insertions(+), 8 deletions(-)
  13. diff --git a/sysdeps/powerpc/preconfigure b/sysdeps/powerpc/preconfigure
  14. index dfe8e20399..bbff040f0f 100644
  15. --- a/sysdeps/powerpc/preconfigure
  16. +++ b/sysdeps/powerpc/preconfigure
  17. @@ -29,10 +29,7 @@ esac
  18. # directive which shows up, and try using it.
  19. case "${machine}:${submachine}" in
  20. *powerpc*:)
  21. - archcpu=`echo "int foo () { return 0; }" \
  22. - | $CC $CFLAGS $CPPFLAGS -S -frecord-gcc-switches -xc -o - - \
  23. - | grep -E "mcpu=|.machine" -m 1 \
  24. - | sed -e "s/.*machine //" -e "s/.*mcpu=\(.*\)\"/\1/"`
  25. + archcpu=''
  26. # Note if you add patterns here you must ensure that an appropriate
  27. # directory exists in sysdeps/powerpc. Likewise, if we find a
  28. # cpu, don't let the generic configure append extra compiler options.
  29. diff --git a/sysdeps/powerpc/preconfigure.ac b/sysdeps/powerpc/preconfigure.ac
  30. index 6c63bd8257..3e925f1d48 100644
  31. --- a/sysdeps/powerpc/preconfigure.ac
  32. +++ b/sysdeps/powerpc/preconfigure.ac
  33. @@ -29,10 +29,7 @@ esac
  34. # directive which shows up, and try using it.
  35. case "${machine}:${submachine}" in
  36. *powerpc*:)
  37. - archcpu=`echo "int foo () { return 0; }" \
  38. - | $CC $CFLAGS $CPPFLAGS -S -frecord-gcc-switches -xc -o - - \
  39. - | grep -E "mcpu=|[.]machine" -m 1 \
  40. - | sed -e "s/.*machine //" -e "s/.*mcpu=\(.*\)\"/\1/"`
  41. + archcpu=''
  42. # Note if you add patterns here you must ensure that an appropriate
  43. # directory exists in sysdeps/powerpc. Likewise, if we find a
  44. # cpu, don't let the generic configure append extra compiler options.