Re: Build Failure on Cygwin

Christian Biesinger
2020-10-19T17:43:13Z

On Mon, Oct 19, 2020 at 7:26 PM Joel Sherrill <joel@rtems.org> wrote:
> I am getting a build failure on Cygwin
>
> /home/jrs007/rtems-cron-6/rtems-source-builder/rtems/build/aarch64-rtems6-gdb-8a6e98c-x86_64-pc-cygwin-1/build/gdb/../../sourceware-mirror-binutils-gdb-8a6e98c/gdb/cp-support.c:1619:(.text+0x5502):
> relocation truncated to fit: R_X86_64_PC32 against undefined symbol `TLS
> init function for thread_local_segv_handler'
> /home/jrs007/rtems-cron-6/rtems-source-builder/rtems/build/aarch64-rtems6-gdb-8a6e98c-x86_64-pc-cygwin-1/build/gdb/../../sourceware-mirror-binutils-gdb-8a6e98c/gdb/cp-support.c:1619:(.text+0x551b):
> 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

I've seen this error on various toolchains. I believe it to be a gcc
bug; however, since it still seems to be an issue on some platforms,
maybe gdb should avoid using global (nonstatic) threadlocal
variables... (and instead abstract access to this variable through
getters/setters)

Christian