GDB 9.1 Fails to Build on Cygwin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

GDB 9.1 Fails to Build on Cygwin

Joel Sherrill
Hi

Over at RTEMS, we are seeing gdb 9.1 fail to build arm-eabi and fail with
this:

 CXXLD  gdb.exe
cp-support.o:/desk/b-arm-eabi-bin/gdb/../../gdb-9.1/gdb/cp-support.c:2212:(.text+0x1bf6):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS
init function for thread_local_segv_handler'
cp-support.o:/desk/b-arm-eabi-bin/gdb/../../gdb-9.1/gdb/cp-support.c:2212:(.text+0x1c00):
relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS
init function for thread_local_segv_handler'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:1908: gdb.exe] Error 1
make[2]: Leaving directory '/desk/b-arm-eabi-bin/gdb'
make[1]: *** [Makefile:9567: all-gdb] Error 2
make[1]: Leaving directory '/desk/b-arm-eabi-bin'
make: *** [Makefile:855: all] Error 2

gdb 8.0.1 builds OK.

Does anyone have any ideas how to solve this?

Thanks.

--joel
RTEMS
Reply | Threaded
Open this post in threaded view
|

Re: GDB 9.1 Fails to Build on Cygwin

Sourceware - gdb list mailing list
 Am Mittwoch, 25. März 2020, 20:01:06 MEZ hat Joel Sherrill <[hidden email]> Folgendes geschrieben:

> Hi
>
> Over at RTEMS, we are seeing gdb 9.1 fail to build arm-eabi and fail with
> this:
>
> CXXLD  gdb.exe
> cp-support.o:/desk/b-arm-eabi-bin/gdb/../../gdb-9.1/gdb/cp-support.c:2212:(.text+0x1bf6):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS
> init function for thread_local_segv_handler'
> cp-support.o:/desk/b-arm-eabi-bin/gdb/../../gdb-9.1/gdb/cp-support.c:2212:(.text+0x1c00):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS
> init function for thread_local_segv_handler'
> collect2: error: ld returned 1 exit status
> make[2]: *** [Makefile:1908: gdb.exe] Error 1
> make[2]: Leaving directory '/desk/b-arm-eabi-bin/gdb'
> make[1]: *** [Makefile:9567: all-gdb] Error 2
> make[1]: Leaving directory '/desk/b-arm-eabi-bin'
> make: *** [Makefile:855: all] Error 2
>
> gdb 8.0.1 builds OK.
>
> Does anyone have any ideas how to solve this?

This looks very much like gcc bug 64697:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

And 8.0.1 didn't use thread_local yet (9.1 is the first version that uses it).


Regards
Hannes Domani
Reply | Threaded
Open this post in threaded view
|

Re: GDB 9.1 Fails to Build on Cygwin

Jim Wilson-2
On Wed, Mar 25, 2020 at 12:27 PM Hannes Domani via Gdb
<[hidden email]> wrote:
>  Am Mittwoch, 25. März 2020, 20:01:06 MEZ hat Joel Sherrill <[hidden email]> Folgendes geschrieben:
> This looks very much like gcc bug 64697:
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697

IMHO this is a binutils bug.  See for instance
    https://sourceware.org/bugzilla/show_bug.cgi?id=23244
for a similar RISC-V issue that I fixed almost 2 years ago, which also
discusses how the ARM port solves this problem.

Jim
Reply | Threaded
Open this post in threaded view
|

Re: GDB 9.1 Fails to Build on Cygwin

Joel Sherrill
On Thu, Mar 26, 2020 at 5:11 PM Jim Wilson <[hidden email]> wrote:

> On Wed, Mar 25, 2020 at 12:27 PM Hannes Domani via Gdb
> <[hidden email]> wrote:
> >  Am Mittwoch, 25. März 2020, 20:01:06 MEZ hat Joel Sherrill <
> [hidden email]> Folgendes geschrieben:
> > This looks very much like gcc bug 64697:
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697
>
> IMHO this is a binutils bug.  See for instance
>     https://sourceware.org/bugzilla/show_bug.cgi?id=23244
> for a similar RISC-V issue that I fixed almost 2 years ago, which also
> discusses how the ARM port solves this problem.
>

Thanks for confirming this isn't just us seeing it.

Jim.. do you mind if I cc' you on the bug when I file it?
You seem to have the best handle on fixing it and will have to provide
advice to whoever tackles it.

--joel


> Jim
>
Reply | Threaded
Open this post in threaded view
|

Re: GDB 9.1 Fails to Build on Cygwin

Jim Wilson-2
On Thu, Mar 26, 2020 at 3:24 PM Joel Sherrill <[hidden email]> wrote:
> Thanks for confirming this isn't just us seeing it.

I haven't seen it yet; I rarely do cygwin development.  I just
recognize the problem as similar to one I fixed in the RISC-V bfd
port.

> Jim.. do you mind if I cc' you on the bug when I file it?

Yes, that is fine.

Jim