linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@imgtec.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	Alex Smith <alex.smith@imgtec.com>,
	linux-mips@linux-mips.org, linux-kernel@vger.kernel.org,
	James Hogan <james.hogan@imgtec.com>
Subject: Re: [PATCH] MIPS: VDSO: Always select -msoft-float
Date: Tue, 1 Nov 2016 22:40:24 +0000	[thread overview]
Message-ID: <alpine.DEB.2.00.1611012208400.24498@tp.orcam.me.uk> (raw)
Message-ID: <20161101224024.A2ASvZZUjV8YHHUePh4y6bydLyZLS-7hJDI-PNhDSVI@z> (raw)
In-Reply-To: <1477843551-21813-1-git-send-email-linux@roeck-us.net>

On Sun, 30 Oct 2016, Guenter Roeck wrote:

> Some toolchains fail to build mips images with the following build error.
> 
> arch/mips/vdso/gettimeofday.c:1:0: error: '-march=r3000' requires '-mfp32'
> 
> This is seen, for example, with the 'mipsel-linux-gnu-gcc (Debian 6.1.1-9)
> 6.1.1 20160705' toolchain as used by the 0Day build robot when building
> decstation_defconfig.
> 
> Comparison of compile flags suggests that the major difference is a missing
> '-soft-float', which is otherwise defined unconditionally.
> 
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Cc: James Hogan <james.hogan@imgtec.com>
> Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---

 Using `-msoft-float' changes the floating-point ABI with the result being 
incompatible with the rest of the userland.  I think the dynamic loader 
may not be currently enforcing ABI compatibility here, but this may change 
in the future.

 Using `-mno-float' in place of `-msoft-float' might be a safer option, 
because even if we start enforcing floating-point ABI checks in dynamic 
loading, then `-mno-float' DSOs will surely remain compatible with 
everything else, because they guarantee no floating-point code or data 
even to be ever produced by the compiler, be it using the software or the 
hardware ABI.  One problem with that option is however that it is 
apparently not universally accepted, for reasons unclear to me offhand.

 That written not so long ago I actually explicitly tried the config file 
sent by the build bot reporting this issue and I built a kernel thus 
configured with current upstream top-of-tree toolchain components, which 
went just fine.  So what I suspect you've observied is just another sign 
of a bug which has been already fixed, maybe even the very same binutils 
bug I referred to recently.

 If you send me the generated assembly, i.e. `gettimeofday.s', that is 
causing you trouble, then I'll see if I can figure out what is going on 
here.  We may decide to paper a particularly nasty toolchain bug over from 
time to time rather than requesting users to apply the relevant proper fix 
to the toolchain, but before we do so I think we first need to thoroughly 
understand what the issue is so as not to cause more harm than good with 
the workaround.

  Maciej

  reply	other threads:[~2016-11-01 22:40 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-30 16:05 [PATCH] MIPS: VDSO: Always select -msoft-float Guenter Roeck
2016-11-01 22:40 ` Maciej W. Rozycki [this message]
2016-11-01 22:40   ` Maciej W. Rozycki
2016-11-01 23:30   ` Guenter Roeck
2016-11-04 12:54     ` Maciej W. Rozycki
2016-11-04 12:54       ` Maciej W. Rozycki
2016-11-04 13:42       ` Matthew Fortune
2016-11-04 15:26         ` Guenter Roeck
2016-11-04 16:09           ` Maciej W. Rozycki
2016-11-04 16:50             ` Guenter Roeck
2016-11-04 18:06               ` Maciej W. Rozycki
2016-11-04 16:55             ` Matthew Fortune
2016-11-04 18:33               ` Guenter Roeck
2016-11-04 19:07               ` Maciej W. Rozycki
2016-11-23  0:08         ` Maciej W. Rozycki

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=alpine.DEB.2.00.1611012208400.24498@tp.orcam.me.uk \
    --to=macro@imgtec.com \
    --cc=alex.smith@imgtec.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux@roeck-us.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).