From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F281C3951C10; Fri, 5 Mar 2021 14:30:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F281C3951C10 From: "giulio.benetti at benettiengineering dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/99410] New: Nios II Error: branch offset out of range Date: Fri, 05 Mar 2021 14:30:34 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 7.3.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: giulio.benetti at benettiengineering dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2021 14:30:35 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99410 Bug ID: 99410 Summary: Nios II Error: branch offset out of range Product: gcc Version: 7.3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: giulio.benetti at benettiengineering dot com Target Milestone: --- When building git package on Buildroot gcc throws: ''' [ 98%] Building C object src/CMakeFiles/bellesip.dir/antlr3c/src/antlr3treeparser.c.o /tmp/ccDtjRfo.s: Assembler messages: /tmp/ccDtjRfo.s:210798: Error: branch offset out of range /tmp/ccDtjRfo.s: Fatal error: branch relaxation failed ''' To reproduce it: # git clone git://git.busybox.net/buildroot # wget https://git.busybox.net/buildroot-test/tree/utils/br-reproduce-build - modify BASE_GIT=3D... with your buildroot path in br-reproduce-build then: # chmod a+x br-reproduce-build # ./br-reproduce-build 71f26fd81db8e9b19b3f18f3f3cefd9c768f094f The only way I've found to build correctly is to turn off optimization overriding CFLAGS with -O0.=