All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: Manuel Lauss <manuel.lauss@gmail.com>,
	Linux-MIPS <linux-mips@linux-mips.org>
Cc: Matthew Fortune <Matthew.Fortune@imgtec.com>,
	"Maciej W. Rozycki" <macro@linux-mips.org>,
	Ralf Baechle <ralf@linux-mips.org>
Subject: Re: [RFC PATCH v6] MIPS: fix build with binutils 2.24.51+
Date: Fri, 31 Oct 2014 16:13:49 +0000	[thread overview]
Message-ID: <5453B53D.7060409@imgtec.com> (raw)
In-Reply-To: <1414771394-24314-1-git-send-email-manuel.lauss@gmail.com>

On 10/31/2014 04:03 PM, Manuel Lauss wrote:
> Starting with version 2.24.51.20140728 MIPS binutils complain loudly
> about mixing soft-float and hard-float object files, leading to this
> build failure since GCC is invoked with "-msoft-float" on MIPS:
> 
> {standard input}: Warning: .gnu_attribute 4,3 requires `softfloat'
>   LD      arch/mips/alchemy/common/built-in.o
> mipsel-softfloat-linux-gnu-ld: Warning: arch/mips/alchemy/common/built-in.o
>  uses -msoft-float (set by arch/mips/alchemy/common/prom.o),
>  arch/mips/alchemy/common/sleeper.o uses -mhard-float
> 
> To fix this, we detect if GAS is new enough to support "-msoft-float" command
> option, and if it does, we can let GCC pass it to GAS;  but then we also need
> to sprinkle the files which make use of floating point registers with the
> necessary ".set hardfloat" directives.
> 
> Signed-off-by: Manuel Lauss <manuel.lauss@gmail.com>
> ---
> Compiles with binutils 2.23 and current git head, tested with alchemy (mips32r1)
> and maltasmvp_defconfig (64bit)
> 
> Tests with MSA and other extensions also appreciated!
> 
> v6: #undef fp so that the preprocessor does not replace the fp in 
> 	.set fp=64 with $30...  Fixes 64bit build.

Technically speaking, a maltasmvp_defconfig selects CONFIG_32BIT=y so
it's still a 32-bit build.
> [...]

Ok the fp problem went away but I still have the even/odd errors with my
tools

arch/mips/kernel/r4k_switch.S: Assembler messages:
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 1
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 3
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 5
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 7
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 9
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 11
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 13
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 15
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 17
arch/mips/kernel/r4k_switch.S:81: Error: float register should be even,
was 19

The following patch did not help either:

diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 58076472bdd8..b8bb7e170fee 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -56,7 +56,7 @@ ifdef CONFIG_FUNCTION_GRAPH_TRACER
   endif
 endif
 cflags-y += $(call cc-option, -mno-check-zero-division)
-
+cflags-y += -mno-odd-spreg

This is with a regular maltasmvp_defconfig

I guess my gcc version is newer than yours. Matthew?

-- 
markos

  reply	other threads:[~2014-10-31 16:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-31 16:03 [RFC PATCH v6] MIPS: fix build with binutils 2.24.51+ Manuel Lauss
2014-10-31 16:13 ` Markos Chandras [this message]
2014-10-31 16:22   ` Manuel Lauss
2014-11-05 16:22     ` Matthew Fortune
2014-10-31 16:35   ` Matthew Fortune
2014-11-07  2:02 ` Ralf Baechle
2014-11-07 11:05   ` Matthew Fortune
2014-11-07 11:32     ` Markos Chandras
2014-11-07 12:28     ` Manuel Lauss

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5453B53D.7060409@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@linux-mips.org \
    --cc=manuel.lauss@gmail.com \
    --cc=ralf@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.