This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
config.guess for mpc8540-linux
- From: Philippe De Muyter <phdm at macqel dot be>
- To: config-patches at gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 31 Mar 2007 00:28:56 +0200
- Subject: config.guess for mpc8540-linux
Hi all,
This is sent both to gcc-patches and config-patches
I just compiled gcc with default options on a mpc8540 board running linux
but the produced compiler is not able to generate the specific SPE instructions
of the MPC8540, because config.guess does not differentiate my board from
another powerpc computer.
Below is a fix for config.guess that would produce the "triplet" expected by
config.gcc. However, I feel that the triplet expected by config.gcc is not
the right one. IMHO, config.gcc should expect
powerpcspe-*-linux*
i.e. the cpu variant should be in the first member of the triplet, not at the
end. I do not know what the other variants could be, but i think the same
should apply to them.
Any comment ?
Nvertheless, here is the patch :
--- config.guessbk 2007-03-30 23:42:51.000000000 +0200
+++ config.guess 2007-03-31 00:07:36.000000000 +0200
@@ -906,7 +906,11 @@
echo or32-unknown-linux-gnu
exit ;;
ppc:Linux:*:*)
- echo powerpc-unknown-linux-gnu
+ case `sed -n '/^chipset/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ 8540) VARIANT="-spe" ;;
+ *) VARIANT="" ;;
+ esac
+ echo powerpc-unknown-linux-gnu${VARIANT}
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-gnu
--
Philippe De Muyter phdm at macqel dot be Tel +32 27029044
Macq Electronique SA rue de l'Aeronef 2 B-1140 Bruxelles Fax +32 27029077