CFT: [build] Move soft-fp support to toplevel libgcc

Paolo Bonzini bonzini@gnu.org
Fri Aug 5 06:53:00 GMT 2011


On 08/03/2011 04:01 PM, Rainer Orth wrote:
>> Configure tests could also make a better replacement for softfp_wrap_start
>> and softfp_wrap_end.
>
> We've got two uses left right now:
>
> * libgcc/config/arm/t-softfp has #ifdef __ARM_ARCH_6M__.  One could
>    probably use AC_EGREP_CPP([__ARM_ARCH_6M__], , [arm_arch_6m=true]) in
>    configure.ac instead, but this is completely untested.

It would have to be something like this:

AC_EGREP_CPP([win win win], [#ifdef __ARM_ARCH_6M__
win win win
#endif], [arm_arch_6m=true])

However, this cannot be in config.host because that file is sourced 
rather than m4_included.

Alternatively, we can make a list of desired symbols and test them in 
configure.ac:

arm-*-*)
   ...
   libgcc_cpp_symbols="$libgcc_cpp_symbols __ARM_ARCH_6M__"
   tmake_file="$tm_file arm/t-softfp"
   ;;

...

# in configure.ac:
# Look for preprocessor symbols that can be useful
cpp_symbols=
if test -n "$libgcc_cpp_symbols"; then
   for i in $libgcc_cpp_symbols; do
     AC_EGREP_CPP([win win win], [#ifdef $i
       win win win
     #endif], [AS_VAR_APPEND([cpp_symbols], [ $i])])
   done
fi
AC_SUBST([cpp_symbols])

...

# config/arm/t-softfp
ifneq ($(filter __ARM_ARCH_6M__, $(cpp_symbols)),)
include ../t-softfp-sfdf
include ../t-softfp-excl
include ../t-softfp
endif

> * libgcc/config/rs6000/t-linux64 has #ifndef __powerpc64__.  Again, one
>    could either check for __powerpc64__ or perform a long_type_size check
>    along the double_type_size etc. checks in the fp-bit patch.

Yes, that's better than using a preprocessor symbol in this case:

> I'm impartial about how to handle this, but would rather get the patch
> in and perform cleanup later than delay even more.

Agreed.

> As the two others, bootstrapped without regressions on
> x86_64-unknown-linux-gnu.  Bootstraps on i386-pc-solaris2.10,
> sparc-sun-solaris2.11, alpha-dec-osf5.1b, mips-sgi-irix6.5, and
> i386-apple-darwin9.8.0 still running.
>
> Ok for mainline if they pass?

Yes, thank you very much!

Paolo



More information about the Gcc-patches mailing list