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