public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump
@ 2021-08-18 22:36 giulio.benetti at benettiengineering dot com
  2021-08-18 22:40 ` [Bug target/101971] " pinskia at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-18 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101971
           Summary: M68k: ICE: Tried to convert PC relative branch to
                    absolute jump
           Product: gcc
           Version: 9.3.0
            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 package bullet on buildroot we get this error:
'''
libtool: compile: 
/home/giuliobenetti/br_reproduce/b92980a563fe7ee331e70f288ce041be0bf29d40/output/host/bin/m68k-linux-g++
-DHAVE_CONFIG_H -I. -std=c++11 -I.. -g -I../others -fPIC -O3 -I../headers
-DCURL_STATICLIB
-I/home/giuliobenetti/br_reproduce/b92980a563fe7ee331e70f288ce041be0bf29d40/output/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/bin/../../usr/include
-DWITH_CURL_SSLVERSION_TLSv1_2 -DWITH_CURL
-I/home/giuliobenetti/br_reproduce/b92980a563fe7ee331e70f288ce041be0bf29d40/output/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/bin/../../usr/include
-DPCRE_STATIC
-I/home/giuliobenetti/br_reproduce/b92980a563fe7ee331e70f288ce041be0bf29d40/output/host/m68k-buildroot-uclinux-uclibc/sysroot/usr/bin/../../usr/include/libxml2
-DWITH_LIBXML2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g0
-fno-dwarf2-cfi-asm -Wl,-elf2flt -fno-dwarf2-cfi-asm -Wl,-elf2flt -c
variables/xml.cc -o variables/libmodsecurity_la-xml.o
/tmp/ccU6wDwq.s: Assembler messages:
/tmp/ccU6wDwq.s: Fatal error: Tried to convert PC relative branch to absolute
jump
make[5]: *** [Makefile:1886: parser/libmodsecurity_la-seclang-scanner.lo] Error
1
make[5]: *** Waiting for unfinished jobs....
/tmp/cckb1Yg3.s: Assembler messages:
/tmp/cckb1Yg3.s: Fatal error: Tried to convert PC relative branch to absolute
jump
make[5]: *** [Makefile:1879: parser/libmodsecurity_la-seclang-parser.lo] Error
1
make[4]: *** [Makefile:3282: all-recursive] Error 1
make[3]: *** [Makefile:1033: all] Error 2
make[2]: *** [Makefile:1032: all-recursive] Error 1
make[1]: *** [package/pkg-generic.mk:270:
/home/giuliobenetti/br_reproduce/b92980a563fe7ee331e70f288ce041be0bf29d40/output/build/libmodsecurity-3.0.5/.stamp_built]
Error 2
make: *** [Makefile:23: _all] Error 2
'''

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=... with your buildroot path in br-reproduce-build then:
# chmod a+x br-reproduce-build
# ./br-reproduce-build b92980a563fe7ee331e70f288ce041be0bf29d40
'''

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
@ 2021-08-18 22:40 ` pinskia at gcc dot gnu.org
  2021-08-18 22:42 ` pinskia at gcc dot gnu.org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-18 22:40 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |m68k-linux
          Component|c++                         |target

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This sounds more like a binutils bug than GCC bug.

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
  2021-08-18 22:40 ` [Bug target/101971] " pinskia at gcc dot gnu.org
@ 2021-08-18 22:42 ` pinskia at gcc dot gnu.org
  2021-08-18 22:48 ` giulio.benetti at benettiengineering dot com
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-08-18 22:42 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Or a buildroot issue of trying to use elf2flt :
https://buildroot.uclibc.narkive.com/EOUb7PvD/patch-v2-m68k-disable-br2-binfmt-flat-sep-data-for-coldfire

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
  2021-08-18 22:40 ` [Bug target/101971] " pinskia at gcc dot gnu.org
  2021-08-18 22:42 ` pinskia at gcc dot gnu.org
@ 2021-08-18 22:48 ` giulio.benetti at benettiengineering dot com
  2021-08-18 23:18 ` giulio.benetti at benettiengineering dot com
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-18 22:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Thank you for pointing, I give it a try, it seems to that one. Also the classic
work-around disabling optimization doesn't work and I was trying other
workaround. But I try that patch now.
Thanks again!

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (2 preceding siblings ...)
  2021-08-18 22:48 ` giulio.benetti at benettiengineering dot com
@ 2021-08-18 23:18 ` giulio.benetti at benettiengineering dot com
  2021-08-19  7:31 ` schwab@linux-m68k.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-18 23:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Package is libmodsecurity, not bullet.

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (3 preceding siblings ...)
  2021-08-18 23:18 ` giulio.benetti at benettiengineering dot com
@ 2021-08-19  7:31 ` schwab@linux-m68k.org
  2021-08-20 16:36 ` giulio.benetti at benettiengineering dot com
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: schwab@linux-m68k.org @ 2021-08-19  7:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andreas Schwab <schwab@linux-m68k.org> changed:

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

--- Comment #5 from Andreas Schwab <schwab@linux-m68k.org> ---
The m68k-linux target only supports 68020+.

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (4 preceding siblings ...)
  2021-08-19  7:31 ` schwab@linux-m68k.org
@ 2021-08-20 16:36 ` giulio.benetti at benettiengineering dot com
  2021-08-21 22:15 ` giulio.benetti at benettiengineering dot com
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-20 16:36 UTC (permalink / raw)
  To: gcc-bugs

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

Giulio Benetti <giulio.benetti at benettiengineering dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |thomas.petazzoni@free-elect
                   |                            |rons.com

--- Comment #6 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Hello Andreas,

I've checked in Linux and it seems still supported as COLDFIRE and then:
- M5206
- M5206e
- M520x
- etc.

Do you mean m68k-linux target in gcc? And if yes, can you please point me which
PR or commit SHA1 drops Coldfire support and makes it compatible only with
68020+?

This way I can disable its support in Buildroot but I need to document.

Thanks in advance

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (5 preceding siblings ...)
  2021-08-20 16:36 ` giulio.benetti at benettiengineering dot com
@ 2021-08-21 22:15 ` giulio.benetti at benettiengineering dot com
  2021-08-21 22:24 ` giulio.benetti at benettiengineering dot com
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-21 22:15 UTC (permalink / raw)
  To: gcc-bugs

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

Giulio Benetti <giulio.benetti at benettiengineering dot com> changed:

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

--- Comment #7 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Hello Andreas, Andrew,

here we use it on target m68k-uclinux not m68k-linux, sorry but that is only a
soft-link pointing to the real compiler(m68k-uclinux-uclibc-gcc).
So what I see here:
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config.gcc;h=08e6c6779a599c26e9b744af7a3a530efeda199b;hb=HEAD#l2366

is that starting from 5206 it can work, statically linked of course because
of the lack of MMU, but it should work.

I'm going to attach the .i and .s files to where it fails.

Please let me know if it's possible and there is the wish/time to fix it.

Thanks a lot

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (6 preceding siblings ...)
  2021-08-21 22:15 ` giulio.benetti at benettiengineering dot com
@ 2021-08-21 22:24 ` giulio.benetti at benettiengineering dot com
  2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-21 22:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Hello Andrew,

what you point:
https://buildroot.uclibc.narkive.com/EOUb7PvD/patch-v2-m68k-disable-br2-binfmt-flat-sep-data-for-coldfire

doesn't give problem since 6 years for all package Buildroot has, it's unlikely
to me it is the root cause(maybe I'm wrong eh :-) ).
Anyway that patch enabled "One memory region" which make "All segments are
linked into one memory region".

So it's more on linker side, here instead we're still on compiler side.

Then it adds a particular patch for a specific "board" qemu based to Linux 4.7,
but again here we are at compiler level. So I don't think it's the problem.

I'm going to attach .i and .s file of gcc failure, let me know if you can find
something and if you have any idea for a work-around.

Thanks a lot!

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (7 preceding siblings ...)
  2021-08-21 22:24 ` giulio.benetti at benettiengineering dot com
@ 2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
  2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-21 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Created attachment 51343
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51343&action=edit
Pre-processed seclang-parser.cc(seclang-parser.ii)

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (8 preceding siblings ...)
  2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
@ 2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
  2021-08-21 22:53 ` giulio.benetti at benettiengineering dot com
  2022-01-14 10:19 ` giulio.benetti at benettiengineering dot com
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-21 22:29 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
Created attachment 51344
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51344&action=edit
Pre-processed seclang-parser.cc(seclang-parser.s)

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (9 preceding siblings ...)
  2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
@ 2021-08-21 22:53 ` giulio.benetti at benettiengineering dot com
  2022-01-14 10:19 ` giulio.benetti at benettiengineering dot com
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2021-08-21 22:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
I think I've found, a -fPIC was in CPPFLAGS while -static too. They can't work
together. Indeed removing -fPIC it builds fine.
So this is the solution.

Please correct if I'm wrong because I'm not that experienced on this topic,
but for me it makes sense.

What do you think?

Thank in advance(again :-)

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

* [Bug target/101971] M68k: ICE: Tried to convert PC relative branch to absolute jump
  2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
                   ` (10 preceding siblings ...)
  2021-08-21 22:53 ` giulio.benetti at benettiengineering dot com
@ 2022-01-14 10:19 ` giulio.benetti at benettiengineering dot com
  11 siblings, 0 replies; 13+ messages in thread
From: giulio.benetti at benettiengineering dot com @ 2022-01-14 10:19 UTC (permalink / raw)
  To: gcc-bugs

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

Giulio Benetti <giulio.benetti at benettiengineering dot com> changed:

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

--- Comment #12 from Giulio Benetti <giulio.benetti at benettiengineering dot com> ---
The previous comment answers to this. So I close this bug.

Best regards

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

end of thread, other threads:[~2022-01-14 10:19 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-18 22:36 [Bug c++/101971] New: M68k: ICE: Tried to convert PC relative branch to absolute jump giulio.benetti at benettiengineering dot com
2021-08-18 22:40 ` [Bug target/101971] " pinskia at gcc dot gnu.org
2021-08-18 22:42 ` pinskia at gcc dot gnu.org
2021-08-18 22:48 ` giulio.benetti at benettiengineering dot com
2021-08-18 23:18 ` giulio.benetti at benettiengineering dot com
2021-08-19  7:31 ` schwab@linux-m68k.org
2021-08-20 16:36 ` giulio.benetti at benettiengineering dot com
2021-08-21 22:15 ` giulio.benetti at benettiengineering dot com
2021-08-21 22:24 ` giulio.benetti at benettiengineering dot com
2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
2021-08-21 22:29 ` giulio.benetti at benettiengineering dot com
2021-08-21 22:53 ` giulio.benetti at benettiengineering dot com
2022-01-14 10:19 ` giulio.benetti at benettiengineering dot com

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).