This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch ARM] Add support for a set of multilibs to be built for A profile cores.
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: Ramana Radhakrishnan <ramrad01 at arm dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Mon, 14 Oct 2013 15:29:20 +0100
- Subject: Re: [Patch ARM] Add support for a set of multilibs to be built for A profile cores.
- Authentication-results: sourceware.org; auth=none
- References: <525675E5 dot 2010006 at arm dot com>
On 10/10/13 10:39, Ramana Radhakrishnan wrote:
> Hi,
>
> One of our internal patches is a multilib patch that helps in testing
> bare-metal toolchains for v7-a and above.
>
> It's a bit brute force but this is something that we use internally
> every night to build a set of base libraries in a hierarchical directory
> structure to be used by bare metal toolchains along with those that want
> to do so from a single toolchain. I don't claim to particularly like
> this patch especially the part of writing the MULTILIB_REUSE macros to
> match as many of the options that I could think of that folks would use
> sensibly along with such a toolchain.
>
>
> - I've missed a few -mfpu options but I deemed them to be uncommon
> enough. If people want to submit a follow on patch for those, I'd be
> happy to take them but this will do for now.
>
> - Additionally if people want to extend this to cover M profile cores
> and all cores, feel free to do so. I don't intend to do so in this cut
> of the makefile fragment.
>
> - I have deliberately avoided documenting that ARM in the supported list
> for --with-multilib-list, because we aren't providing this option like
> other targets in this regard.
>
> - Additionally one cannot use with --with-cpu , --with-fpu, --with-float
> --with-mode --with-arch command line options with this as the make file
> fragment is written assuming such a case.
>
> This does not handle all the general options that --with-multilib-list
> provides with actually providing options on the command line, trying to
> write this with the command lines as suggested in other ports for the
> length that I have in mind, is just going to be unweildy and extremely
> irritating on the command line.
>
> Additionally there is no easy way of supplying multilib_reuse options on
> the command line, with the result that the configure command line would
> be long, prone to error and extremely fragile. This is less fragile than
> that approach and hence I prefer this form for the ARM backend for the
> current work and for people who are interested in this sort of a thing.
>
> Additionally tested with a noddy shell script that goes something like
> and checked for no failures.
>
> for mode in marm mthumb ; do
> for fabi in hard softfp ; do
> for fpu in vfpv3-d16 vfpv3 vfpv4-d16 vfpv4 neon neon-vfpv4 fp-armv8
> neon-fp-armv8 ; do
> for cpu in cortex-a8 cortex-a5 cortex-a9 cortex-a7 cortex-a15
> cortex-a53; do
> x=`$COMPILER /tmp/hello.c -mcpu="$cpu" -mfpu="$fpu"
> -mfloat-abi="$fabi" "-$mode" -print-multi-directory -lm`
> if [ "$x" != "." ];
> then
> echo "PASS: mcpu=$cpu mfpu=$fpu mfloat-abi=$fabi -$mode"
> else
> echo "FAIL: mcpu=$cpu mfpu=$fpu mfloat-abi=$fabi -$mode"
> fi
> done
> done
> done
>
> for fpu in vfpv3-d16 vfpv3 vfpv4-d16 vfpv4 neon neon-vfpv4 fp-armv8
> neon-fp-armv8 crypto-neon-fp-armv8 ; do
> for fabi in hard softfp ; do
> for arch in armv7-a armv8-a ; do
> # $COMPILER /tmp/hello.c -march="$arch" -mfpu="$fpu"
> -mfloat-abi="$fabi" -"$mode" -lm
> x=`$COMPILER /tmp/hello.c -march="$arch" -mfpu="$fpu"
> -mfloat-abi="$fabi" "-$mode" -print-multi-directory -lm`
> if [ "$x" != "." ];
> then
> echo "PASS: march=$arch mfpu=$fpu mfloat-abi=$fabi -$mode"
> else
> echo "FAIL: march=$arch mfpu=$fpu mfloat-abi=$fabi -$mode"
> fi
> done
> done
> done
>
>
> Tested on arm-none-eabi with --with-multilib-list=aprofile C, C++ and
> Fortran with no regressions on an ARM fast model. Note that this is not
> on by default so will not affect default build times and we have
> auto-testers internally that use this feature.
>
> I think I can apply the changes for config.gcc but I'd still like
> another set of eyes on this please.
>
> Ok ?
>
> regards
> Ramana
>
>
> <DATE> Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
> Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
>
>
> * config/arm/t-aprofile: New file.
> * config.gcc: Handle --with-multilib-list option.
>
>
OK.
R.