On Fri, 2014-08-08 at 08:38 -0700, Steve Ellcey wrote: > Recent changes to the MIPS binutils sources have made it necessary for > GCC to pass the -msoft-float to the assembler if it wants an object > file marked as soft-float. This patch makes GCC pass any -mhard-float, > or -msoft-float flags that were used on the compile line on to the > assembler so the executable is marked appropriately. I did not do > anything with -mno-float because the GNU assembler doesn't have a > -mno-float flag. > > Without this patch (and a second one I will submit shortly) I cannot > build soft-float multilibs with the latest GCC and top-of-tree binutils. > > Tested with the mips-mti-linux-gnu toolchain. > > OK to checkin? > > Steve Ellcey > sell...@mips.com
Matthew Fortune pointed out that -msingle-float has the same issue. I didn't run into it because I wasn't building single-float multilibs but I modified this patch to pass -msingle-float and -mdouble-float to the assembler as well as -mhard-float and -msoft-float. Here is the modified patch to pass all four flags on to the assembler. Steve Ellcey sell...@mips.com 2014-08-08 Steve Ellcey <sell...@mips.com> * config/mips/mips.h (ASM_SPEC): Pass float options to assembler. diff --git a/gcc/config/mips/mips.h b/gcc/config/mips/mips.h index 8d7a09f..9a15287 100644 --- a/gcc/config/mips/mips.h +++ b/gcc/config/mips/mips.h @@ -1187,6 +1187,8 @@ struct mips_cpu_info { %{mshared} %{mno-shared} \ %{msym32} %{mno-sym32} \ %{mtune=*} \ +%{mhard-float} %{msoft-float} \ +%{msingle-float} %{mdouble-float} \ %(subtarget_asm_spec)" /* Extra switches sometimes passed to the linker. */