From patchwork Tue Sep 7 12:30:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [ARM] ARM / linux float ABI discrepancy Date: Tue, 07 Sep 2010 02:30:01 -0000 From: Christophe LYON X-Patchwork-Id: 64002 Message-Id: <4C863049.1050202@st.com> To: Hi, As I mentioned in http://gcc.gnu.org/ml/gcc/2010-08/msg00280.html, there is a discrepancy in the description of the default float ABI when it comes to multilib support for ARM/Linux. Without this patch, using MULTILIB_OPTIONS = msoft-float/mhard-float would have the effect of handling 2 lib sets both compiled as msoft-float. The small patch I propose is attached. Christophe. diff -rup gcc-4.5.0/gcc/config/arm/linux-eabi.h gcc-4.5.0.patched//gcc/config/arm/linux-eabi.h --- gcc-4.5.0/gcc/config/arm/linux-eabi.h 2009-10-30 21:03:09.000000000 +0100 +++ gcc-4.5.0.patched//gcc/config/arm/linux-eabi.h 2010-09-07 09:51:13.000000000 +0200 @@ -35,6 +35,10 @@ #undef TARGET_DEFAULT_FLOAT_ABI #define TARGET_DEFAULT_FLOAT_ABI ARM_FLOAT_ABI_SOFT +#undef MULTILIB_DEFAULTS +#define MULTILIB_DEFAULTS \ + { "marm", TARGET_ENDIAN_OPTION, "msoft-float", "mno-thumb-interwork" } + /* We default to the "aapcs-linux" ABI so that enums are int-sized by default. */ #undef ARM_DEFAULT_ABI diff -rup gcc-4.5.0/gcc/config/arm/linux-elf.h gcc-4.5.0.patched//gcc/config/arm/linux-elf.h --- gcc-4.5.0/gcc/config/arm/linux-elf.h 2009-11-05 15:47:45.000000000 +0100 +++ gcc-4.5.0.patched//gcc/config/arm/linux-elf.h 2010-09-07 09:51:09.000000000 +0200 @@ -51,7 +51,7 @@ #undef MULTILIB_DEFAULTS #define MULTILIB_DEFAULTS \ - { "marm", "mlittle-endian", "mhard-float", "mno-thumb-interwork" } + { "marm", TARGET_ENDIAN_OPTION, "mhard-float", "mno-thumb-interwork" } /* Now we define the strings used to build the spec file. */ #undef LIB_SPEC