public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu
@ 2014-11-21 2:04 olegendo at gcc dot gnu.org
2014-11-21 5:09 ` [Bug target/64008] " kkojima at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-11-21 2:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
Bug ID: 64008
Summary: [SH] sh4-linux configured compiler rejects -m4-nofpu
Product: gcc
Version: 5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: olegendo at gcc dot gnu.org
CC: kkojima at gcc dot gnu.org, segher at gcc dot gnu.org
Target: sh*-*-*
This issue has been mentioned by Segher while he was trying to build an SH4
linux kernel on a powerpc host. Segher, could you please add the configure
options you have used for that?
Looking at the SUPPORT_SH* macros in sh.h starting at line 161, it's not
entirely clear to me what those are trying to accomplish.
For instance:
#if SUPPORT_SH1
#define SUPPORT_SH2 1
#endif
... to me reads that when SH1 support is enabled (-m1 option), then support for
SH2 (-m2 option) is also enabled. This looks like it should be the other way
around.
Kaz, do you have any idea why these SUPPORT_SH* macros are needed? Why isn't
just every CPU/FPU type marked as supported?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
@ 2014-11-21 5:09 ` kkojima at gcc dot gnu.org
2014-11-22 4:30 ` olegendo at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: kkojima at gcc dot gnu.org @ 2014-11-21 5:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
--- Comment #1 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #0)
> Kaz, do you have any idea why these SUPPORT_SH* macros are needed? Why
> isn't just every CPU/FPU type marked as supported?
I have no idea for those macros. Some historical reason?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
2014-11-21 5:09 ` [Bug target/64008] " kkojima at gcc dot gnu.org
@ 2014-11-22 4:30 ` olegendo at gcc dot gnu.org
2014-11-22 7:59 ` kkojima at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-11-22 4:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
Oleg Endo <olegendo at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |iwamatsu at nigauri dot org
--- Comment #2 from Oleg Endo <olegendo at gcc dot gnu.org> ---
I guess the SUPPORT_* macros are there to prevent scenarios like:
- SH4 machine with a GCC configured to produce SH4 code (with FPU, double
precision by default) without any -m options.
- No soft-fpu support code nor other multilib support code is present on the
SH4 machine
- Compiling a program with -m2 would produce SH2 code which might use soft-fpu
support code and various libgcc functions (e.g. dynamic shifts)
- Link error
Looking at config.gcc, it seems that specifying --enable-incomplete-targets
solves the problem, as it effectively enables all the target options.
Some related links:
https://lkml.org/lkml/2014/7/8/732
http://lists.openwall.net/linux-kernel/2014/07/08/1071
and a patch from somewhere else that seems related:
http://cgit.openembedded.org/openembedded/plain/recipes/gcc/gcc-4.5/sh4-multilib.patch
Maybe Nobuhiro has some comments regarding this issue...
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
2014-11-21 5:09 ` [Bug target/64008] " kkojima at gcc dot gnu.org
2014-11-22 4:30 ` olegendo at gcc dot gnu.org
@ 2014-11-22 7:59 ` kkojima at gcc dot gnu.org
2014-11-22 14:58 ` segher at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: kkojima at gcc dot gnu.org @ 2014-11-22 7:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
--- Comment #3 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Oleg Endo from comment #2)
> and a patch from somewhere else that seems related:
>
> http://cgit.openembedded.org/openembedded/plain/recipes/gcc/gcc-4.5/sh4-
> multilib.patch
Perhaps I don't get the original problem. The kernel folks used to
specify --with-multilib-list=m4,m4-nofpu during configuring sh4-linux
gcc. Doesn't it work now?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
` (2 preceding siblings ...)
2014-11-22 7:59 ` kkojima at gcc dot gnu.org
@ 2014-11-22 14:58 ` segher at gcc dot gnu.org
2014-11-23 1:23 ` kkojima at gcc dot gnu.org
2014-12-21 20:56 ` olegendo at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: segher at gcc dot gnu.org @ 2014-11-22 14:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
--- Comment #4 from Segher Boessenkool <segher at gcc dot gnu.org> ---
I configured for sh4-linux, foolishly thinking that sh4-nofpu would
work with that as well. Why not build all "regular" multilibs for
every "regular" config? Maybe keep sh5, sh2a separate, I dunno (I
note that sh2a-nofpu is built for sh1 and sh2 configs, but not e.g.
sh3 or sh4, or sh2a itself! Truly strange stuff. I suspect it makes
sense in that it builds a minimal amount of multilibs and then supports
everything it can
with that, but that does not make terribly much sense from the viewpoint
of a user).
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
` (3 preceding siblings ...)
2014-11-22 14:58 ` segher at gcc dot gnu.org
@ 2014-11-23 1:23 ` kkojima at gcc dot gnu.org
2014-12-21 20:56 ` olegendo at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: kkojima at gcc dot gnu.org @ 2014-11-23 1:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
--- Comment #5 from Kazumoto Kojima <kkojima at gcc dot gnu.org> ---
(In reply to Segher Boessenkool from comment #4)
At least for sh4, it would have a historical reason. In the old
time, -m4-nofpu confused many users (including me). From its name,
those users expected that it'll give the same ABI for integer only
programs with -m4 and fallen into the pit. Then no one complained
when the default configuration was -m4 only for sh4-linux gcc and
the kernel folks satisfied with --with-multilib-list=m4,m4-nofpu.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/64008] [SH] sh4-linux configured compiler rejects -m4-nofpu
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
` (4 preceding siblings ...)
2014-11-23 1:23 ` kkojima at gcc dot gnu.org
@ 2014-12-21 20:56 ` olegendo at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-21 20:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64008
--- Comment #6 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Ah, ancient issue is ancient:
Here it starts: https://gcc.gnu.org/ml/gcc/2003-07/msg01851.html
Still, I think Segher has a point in comment #4. Why not just enable all the
multilibs for any configuration? At least it would be a friendly default
value. If users don't want that (space limitations?), they can still disable
it with --disable-multilib.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-12-21 20:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-21 2:04 [Bug target/64008] New: [SH] sh4-linux configured compiler rejects -m4-nofpu olegendo at gcc dot gnu.org
2014-11-21 5:09 ` [Bug target/64008] " kkojima at gcc dot gnu.org
2014-11-22 4:30 ` olegendo at gcc dot gnu.org
2014-11-22 7:59 ` kkojima at gcc dot gnu.org
2014-11-22 14:58 ` segher at gcc dot gnu.org
2014-11-23 1:23 ` kkojima at gcc dot gnu.org
2014-12-21 20:56 ` olegendo at gcc dot gnu.org
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 read-only IMAP folder(s) and NNTP newsgroup(s).