public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc
@ 2020-11-02 21:54 jsm28 at gcc dot gnu.org
  2020-11-03  7:24 ` [Bug target/97683] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2020-11-02 21:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97683
           Summary: [11 Regression] nios2 assembler branch offset errors
                    building glibc
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: assemble-failure
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jsm28 at gcc dot gnu.org
                CC: cltang at gcc dot gnu.org, sandra at gcc dot gnu.org
  Target Milestone: ---
            Target: nios2-*-*

Created attachment 49489
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49489&action=edit
preprocessed source

Building glibc for nios2-linux-gnu produces a long series of errors of the
form:

/tmp/ccwdG18R.s: Assembler messages:
/tmp/ccwdG18R.s:4291: Error: branch offset 38052 out of range -32768 to 32767

Compile the attached preprocessed source with: -c -fpic -g -O2 (note, -g is for
some reason required for the errors to appear).

I don't know quite when this appeared because the glibc build with GCC mainline
was broken for a while with architecture-independent issues.

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
@ 2020-11-03  7:24 ` rguenth at gcc dot gnu.org
  2021-01-22 10:39 ` fw at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-03  7:24 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4
   Target Milestone|---                         |11.0

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
  2020-11-03  7:24 ` [Bug target/97683] " rguenth at gcc dot gnu.org
@ 2021-01-22 10:39 ` fw at gcc dot gnu.org
  2021-01-23  5:03 ` sandra at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: fw at gcc dot gnu.org @ 2021-01-22 10:39 UTC (permalink / raw)
  To: gcc-bugs

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

Florian Weimer <fw at gcc dot gnu.org> changed:

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

--- Comment #1 from Florian Weimer <fw at gcc dot gnu.org> ---
This bug is still present.

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
  2020-11-03  7:24 ` [Bug target/97683] " rguenth at gcc dot gnu.org
  2021-01-22 10:39 ` fw at gcc dot gnu.org
@ 2021-01-23  5:03 ` sandra at gcc dot gnu.org
  2021-01-25 11:02 ` fw at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sandra at gcc dot gnu.org @ 2021-01-23  5:03 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from sandra at gcc dot gnu.org ---
I'm pretty sure this is a gas bug.  I used git bisect to track it down to
binutils commit ae9d2233e61a98ff8dba56be10219aa5306ffc9a which caused gcc to
start passing --gdwarf-5 on the gas command line.  The DWARF-5 support was
present in gas before that and I think it's likely that's disagreeing with
something nios2-specific, perhaps mistakenly adding the size of the dwarf
directive data to the code length or something like that.  The differences in
the .s file generated by GCC for the test case between that binutils revision
with --gdwarf-5 and the one before it without that option don't seem to be
significant.

While working on this, I ran into another issue that is independently
preventing glibc from building:

In function '__rawmemchr',
    inlined from '__rawmemchr' at rawmemchr.c:27:1:
rawmemchr.c:40:12: error: 'memchr' specified bound 4294967295 exceeds maximum
object size 2147483647 [-Werror=stringop-overread]
   40 |     return memchr (s, c, (size_t)-1);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

I apologize that this is all in such bad shape -- the last time I tried doing
any testing on this target I ran into the glibc breakage Joseph mentioned, and
since then I've been assigned to a different project where my focus has been on
the gfortran front end instead.  :-S  I'll see if I can get some traction on
the gas bug, though.

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-01-23  5:03 ` sandra at gcc dot gnu.org
@ 2021-01-25 11:02 ` fw at gcc dot gnu.org
  2021-01-25 15:58 ` hjl.tools at gmail dot com
  2021-01-25 16:00 ` fw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: fw at gcc dot gnu.org @ 2021-01-25 11:02 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Florian Weimer <fw at gcc dot gnu.org> ---
Thanks. The -Werror failure you reported is due to PR98512. Martin has posted a
patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-January/564060.html

Should I open a binutils bug with the generated .s file?

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-01-25 11:02 ` fw at gcc dot gnu.org
@ 2021-01-25 15:58 ` hjl.tools at gmail dot com
  2021-01-25 16:00 ` fw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: hjl.tools at gmail dot com @ 2021-01-25 15:58 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-01-25

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to sandra from comment #2)
> I'm pretty sure this is a gas bug.  I used git bisect to track it down to
> binutils commit ae9d2233e61a98ff8dba56be10219aa5306ffc9a which caused gcc to
> start passing --gdwarf-5 on the gas command line.  The DWARF-5 support was
> present in gas before that and I think it's likely that's disagreeing with
> something nios2-specific, perhaps mistakenly adding the size of the dwarf
> directive data to the code length or something like that.  The differences
> in the .s file generated by GCC for the test case between that binutils
> revision with --gdwarf-5 and the one before it without that option don't
> seem to be significant.

I opened:

https://sourceware.org/bugzilla/show_bug.cgi?id=27243

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

* [Bug target/97683] [11 Regression] nios2 assembler branch offset errors building glibc
  2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-01-25 15:58 ` hjl.tools at gmail dot com
@ 2021-01-25 16:00 ` fw at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: fw at gcc dot gnu.org @ 2021-01-25 16:00 UTC (permalink / raw)
  To: gcc-bugs

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

Florian Weimer <fw at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://sourceware.org/bugz
                   |                            |illa/show_bug.cgi?id=27243
         Resolution|---                         |MOVED
             Status|NEW                         |RESOLVED

--- Comment #5 from Florian Weimer <fw at gcc dot gnu.org> ---
Marking as moved.

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

end of thread, other threads:[~2021-01-25 16:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 21:54 [Bug target/97683] New: [11 Regression] nios2 assembler branch offset errors building glibc jsm28 at gcc dot gnu.org
2020-11-03  7:24 ` [Bug target/97683] " rguenth at gcc dot gnu.org
2021-01-22 10:39 ` fw at gcc dot gnu.org
2021-01-23  5:03 ` sandra at gcc dot gnu.org
2021-01-25 11:02 ` fw at gcc dot gnu.org
2021-01-25 15:58 ` hjl.tools at gmail dot com
2021-01-25 16:00 ` fw 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).