This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH mips] Pass -msoft-float/-mhard-float flags to GAS
- From: Steve Ellcey <sellcey at mips dot com>
- To: <clm at codesourcery dot com>, <matthew dot fortune at imgtec dot com>, <echristo at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 8 Aug 2014 12:41:40 -0700
- Subject: Re: [PATCH mips] Pass -msoft-float/-mhard-float flags to GAS
- Authentication-results: sourceware.org; auth=none
- References: <dbb904a0-4070-407c-b3e7-c04703769bb8 at BAMAIL02 dot ba dot imgtec dot org>
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
> sellcey@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
sellcey@mips.com
2014-08-08 Steve Ellcey <sellcey@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. */