This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Automatic CPU detection in preconfigure
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: <libc-alpha at sourceware dot org>, <fweimer at redhat dot com>, Carlos Eduardo Seo <cseo at linux dot vnet dot ibm dot com>
- Date: Wed, 8 Feb 2017 17:13:56 +0000
- Subject: Re: [PATCH] powerpc: Automatic CPU detection in preconfigure
- Authentication-results: sourceware.org; auth=none
- References: <5707A01A.7060901@redhat.com> <1486559603-13798-1-git-send-email-tuliom@linux.vnet.ibm.com>
On Wed, 8 Feb 2017, Tulio Magno Quites Machado Filho wrote:
> Added a check to detect the CPU value in preconfigure, so that glibc is
> built with the correct --with-cpu value.
I don't think setting submachine as you do here is appropriate; it will
result in the logic that tried using -mcpu=$submachine being activated,
which will override the compiler defaults you've just detected (e.g.
result in -mcpu=476 being passed when the default is -mcpu=476fp, so
wrongly changing the ABI to soft-float).
Ratherm you should append appropriately to the machine setting in cases
where there are relevant sysdeps directories. (Make sure this does
achieve the desired effects regarding use of sysdeps/powerpc/power7 etc.
directories not just those under powerpc64 or powerpc32.)
> + { $as_echo "$as_me:${as_lineno-$LINENO}: --with-cpu not set. Trying to detect CPU." >&5
> + $as_echo "$as_me: --with-cpu not set. Trying to detect CPU." >&6;}
This is using Autoconf internals. If you want to send messages like that,
don't hardcode details of Autoconf internals in a preconfigure script.
Rather, move powerpc to using preconfigure.ac, and use the appropriate
AC_* macros there.
> + e500mc|e500mc64)
> + submachine="e500"
> + ;;
No, the e500 sysdeps directories are strictly for classic e500, not e500mc
or e500mc64.
> + a2|464|970|power*)
> + submachine=${archcpu}
And you may want the power* logic to be smarter to map power10, power11
etc. to power9 sysdeps directories until there are sysdeps directories for
such future architecture variants.
--
Joseph S. Myers
joseph@codesourcery.com