public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64
@ 2012-11-16 11:56 dan at danny dot cz
  2012-11-19 16:02 ` [Bug target/55351] " nickc at redhat dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: dan at danny dot cz @ 2012-11-16 11:56 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

             Bug #: 55351
           Summary: can't build libgcc for -m5-compact variant in SH64
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: dan@danny.cz


Created attachment 28708
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28708
preprocessed lib1funcs.S file

when building libgcc for the -m5-compact multilib variant in sh64-linux
compiler I get the following error:

....
/builddir/build/BUILD/gcc-4.7.2-20121114-aarch64/sh64-linux-gnu/./gcc/xgcc
-B/builddir/build/BUILD/gcc-4.7.2-20121114-aarch64/sh64-linux-gnu/./gcc/
-B/usr/sh64-linux/bin/ -B/usr/sh64-linux/lib/ -isystem /usr/sh64-linux/include
-isystem /usr/sh64-linux/sys-include  -m5-compact -g -O2 -O2  -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition 
-isystem ./include   -fpic -mieee -mieee -DNO_FPSCR_VALUES -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector -Dinhibit_libc  -fpic -mieee -mieee
-DNO_FPSCR_VALUES -I. -I. -I../../.././gcc
-I../../../../gcc-4.7.2-20121114-aarch64/libgcc
-I../../../../gcc-4.7.2-20121114-aarch64/libgcc/.
-I../../../../gcc-4.7.2-20121114-aarch64/libgcc/../gcc
-I../../../../gcc-4.7.2-20121114-aarch64/libgcc/../include  -DHAVE_CC_TLS
-DUSE_EMUTLS -o _div_table.o -MT _div_table.o -MD -MP -MF _div_table.dep
-DL_div_table -xassembler-with-cpp -c
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S: Assembler
messages:
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3054:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3056:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3057:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3058:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3060:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3061:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3062:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3063:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3064:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3065:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3066:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3067:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3068:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3069:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3070:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3071:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3072:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3073:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3075:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3076:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3077:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3078:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3080:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3081:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3082:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3083:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3084:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3085:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3086:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3087:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3088:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3089:
Error: unknown opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3090:
Error: invalid operands for opcode
../../../../gcc-4.7.2-20121114-aarch64/libgcc/config/sh/lib1funcs.S:3091:
Error: unknown opcode
make: *** [_div_table.o] Error 1

It looks as a conflict between -m5-compact set on the command line and
.section .text..SHmedia32,"ax"
in the source file (see attachment for a preprocessed file). Also interesting
is the presence of "_sdivsi3" in this file.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
@ 2012-11-19 16:02 ` nickc at redhat dot com
  2012-11-20 15:10 ` dhowells at redhat dot com
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: nickc at redhat dot com @ 2012-11-19 16:02 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #1 from Nick Clifton <nickc at redhat dot com> 2012-11-19 16:01:36 UTC ---
Created attachment 28732
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28732
Fixes to allow libgcc to build for the sh64-linux target

I am no SH expert, so this patch may well be wrong.  But it does allow libgcc
to built (for all supported multilibs) for the sh64-linux target.

There seem to be three problems:

  1. As reported in this PR, the sdivsi3 function is being built for the
L_div_table target when it clearly uses instructions that are not supported by
the target SH variant.  I have assumed that this is a mistake and so stopped
the function from being built for the m5-compact multilib.

  2. The udiv_qrnnd_16 function is not being built.  It is built for non-Linux
Sh targets, so I have assumed that it is an oversight and added it to the list
of functions to build.

  3. The m5-media64 and m5-media64-nofpu multilibs need the linker to support a
shlefl64_linux emulation.  The linker does not do this, so I have suppressed
all multilibs based on these options.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
  2012-11-19 16:02 ` [Bug target/55351] " nickc at redhat dot com
@ 2012-11-20 15:10 ` dhowells at redhat dot com
  2012-11-20 15:16 ` dan at danny dot cz
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dhowells at redhat dot com @ 2012-11-20 15:10 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #2 from dhowells at redhat dot com <dhowells at redhat dot com> 2012-11-20 15:09:42 UTC ---
The first hunk of the patch that adds:

   MULTILIB_EXCEPTIONS = *m5-64media* *m5-64media-nofpu*

to gcc/config/sh/t-linux causes the sh-linux-gnu build to fail.  Commenting out
this line allows both sh- and sh64-linux-gnu to build.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
  2012-11-19 16:02 ` [Bug target/55351] " nickc at redhat dot com
  2012-11-20 15:10 ` dhowells at redhat dot com
@ 2012-11-20 15:16 ` dan at danny dot cz
  2014-12-01 23:35 ` olegendo at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dan at danny dot cz @ 2012-11-20 15:16 UTC (permalink / raw)
  To: gcc-bugs


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #3 from Dan Horák <dan at danny dot cz> 2012-11-20 15:15:50 UTC ---
(In reply to comment #2)
> The first hunk of the patch that adds:
> 
>    MULTILIB_EXCEPTIONS = *m5-64media* *m5-64media-nofpu*
> 
> to gcc/config/sh/t-linux causes the sh-linux-gnu build to fail.  Commenting out
> this line allows both sh- and sh64-linux-gnu to build.

I guess there is a conflict with the "!" values in
--with-multilib-list=m1,m2,m2e,m4,m4-single,m4-single-only,m2a,m2a-single,!m2a,!m2a-single
passed to the sh-linux compiler


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (2 preceding siblings ...)
  2012-11-20 15:16 ` dan at danny dot cz
@ 2014-12-01 23:35 ` olegendo at gcc dot gnu.org
  2014-12-07 23:14 ` olegendo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-01 23:35 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |segher at gcc dot gnu.org

--- Comment #4 from Oleg Endo <olegendo at gcc dot gnu.org> ---
I think this issue was fixed by r218190:

libgcc/ChangeLog:
        * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
        whether it's defined.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (3 preceding siblings ...)
  2014-12-01 23:35 ` olegendo at gcc dot gnu.org
@ 2014-12-07 23:14 ` olegendo at gcc dot gnu.org
  2014-12-09  6:27 ` segher at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-07 23:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #5 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Segher, was the error in the original description here the same you were
hitting when building sh64 linux?


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (4 preceding siblings ...)
  2014-12-07 23:14 ` olegendo at gcc dot gnu.org
@ 2014-12-09  6:27 ` segher at gcc dot gnu.org
  2014-12-09 22:46 ` olegendo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: segher at gcc dot gnu.org @ 2014-12-09  6:27 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #6 from Segher Boessenkool <segher at gcc dot gnu.org> ---
Yes it was.  Thanks for fixing.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (5 preceding siblings ...)
  2014-12-09  6:27 ` segher at gcc dot gnu.org
@ 2014-12-09 22:46 ` olegendo at gcc dot gnu.org
  2014-12-09 22:52 ` olegendo at gcc dot gnu.org
  2014-12-09 22:53 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-09 22:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #7 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Author: olegendo
Date: Tue Dec  9 22:45:26 2014
New Revision: 218544

URL: https://gcc.gnu.org/viewcvs?rev=218544&root=gcc&view=rev
Log:
libgcc/
    Backport from mainline
    2014-11-30  Oleg Endo  <olegendo@gcc.gnu.org>

    PR target/55351
    * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
    whether it's defined.

Modified:
    branches/gcc-4_9-branch/libgcc/ChangeLog
    branches/gcc-4_9-branch/libgcc/config/sh/lib1funcs.S


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (6 preceding siblings ...)
  2014-12-09 22:46 ` olegendo at gcc dot gnu.org
@ 2014-12-09 22:52 ` olegendo at gcc dot gnu.org
  2014-12-09 22:53 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-09 22:52 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

--- Comment #8 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Author: olegendo
Date: Tue Dec  9 22:51:32 2014
New Revision: 218545

URL: https://gcc.gnu.org/viewcvs?rev=218545&root=gcc&view=rev
Log:
libgcc/
    Backport from mainline
    2014-11-30  Oleg Endo  <olegendo@gcc.gnu.org>

    PR target/55351
    * config/sh/lib1funcs.S: Check value of __SHMEDIA__ instead of checking
    whether it's defined.

Modified:
    branches/gcc-4_8-branch/libgcc/ChangeLog
    branches/gcc-4_8-branch/libgcc/config/sh/lib1funcs.S


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug target/55351] can't build libgcc for -m5-compact variant in SH64
  2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
                   ` (7 preceding siblings ...)
  2014-12-09 22:52 ` olegendo at gcc dot gnu.org
@ 2014-12-09 22:53 ` olegendo at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-12-09 22:53 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=55351

Oleg Endo <olegendo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Oleg Endo <olegendo at gcc dot gnu.org> ---
Fixed on trunk (5.0), 4.9 and 4.8.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-12-09 22:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16 11:56 [Bug target/55351] New: can't build libgcc for -m5-compact variant in SH64 dan at danny dot cz
2012-11-19 16:02 ` [Bug target/55351] " nickc at redhat dot com
2012-11-20 15:10 ` dhowells at redhat dot com
2012-11-20 15:16 ` dan at danny dot cz
2014-12-01 23:35 ` olegendo at gcc dot gnu.org
2014-12-07 23:14 ` olegendo at gcc dot gnu.org
2014-12-09  6:27 ` segher at gcc dot gnu.org
2014-12-09 22:46 ` olegendo at gcc dot gnu.org
2014-12-09 22:52 ` olegendo at gcc dot gnu.org
2014-12-09 22:53 ` 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).