libunwind/libunwind

aarch64 on QNX 7.0 FTBFS

bregma opened this issue · 0 comments

Environment

  • libunwind version: master
  • architecture: aarch64
  • OS: QNX 7.0

Description

libunwind 1.8 (and master) fails to build from source on QNX SDP 7.0 with GCC 5.4.0 GNU binutils 2.25.1 wit the following error.

aarch64-test-plt.o: In function `is_qnx_kercall':
aarch64-test-plt.c:(.text+0xa78): undefined reference to `_Uaarch64_get_accessors_int'

This is because aarch64-test-plt.c (and aarch64-test-frame-record.c) #include Gstep.c and the weak alias in the library does not get picked up. Later binutils linkers cope with this OK.

Reproduction Steps
Steps to reproduce the behavior:
1.On a fresh autoreconf'd source clone, run configure --host=aarch64-unknown-nto-qnx7.0.0 --build=x86_64-linux-gnu
2. Run make

Suggested Solution
Instead of #includeing the source file, the function is_plt_entry() should be a visible symbol and the tests should exercise the symbol from the shipped library rather than a separately-compiled instance that may have been built with different compile options.