From: Christophe Lyon Date: Wed, 17 Aug 2022 08:06:24 +0000 (+0200) Subject: arm: Define with_float to hard when target name ends with hf X-Git-Tag: basepoints/gcc-14~5119 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06bca6950b154d7c85762acf1593d6792f8a2617;p=thirdparty%2Fgcc.git arm: Define with_float to hard when target name ends with hf On arm, the --with-float= configure option is used to define include files search path (among other things). However, when targeting arm-linux-gnueabihf, one would expect to automatically default to the hard-float ABI, but this is not the case. As a consequence, GCC bootstrap fails on an arm-linux-gnueabihf target if --with-float=hard is not used. This patch checks if the target name ends with 'hf' and defines with_float to hard if not already defined. This is achieved in gcc/config.gcc, just before selecting the default CPU depending on the $with_float value. 2022-08-17 Christophe Lyon gcc/ * config.gcc (arm): Define with_float to hard if target name ends with 'hf'. --- diff --git a/gcc/config.gcc b/gcc/config.gcc index 4e3b15bb5e9..02f58970db0 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1314,6 +1314,13 @@ arm*-*-linux-* | arm*-*-uclinuxfdpiceabi) tm_file="$tm_file arm/uclinuxfdpiceabi.h" ;; esac + # Define with_float to "hard" if not already defined and + # target name ends with "hf" + case $target:$with_float in + arm*-*-*hf:) + with_float=hard + ;; + esac # Generation of floating-point instructions requires at least ARMv5te. if [ "$with_float" = "hard" -o "$with_float" = "softfp" ] ; then target_cpu_cname="arm10e"