Opened on 06/12/19 at 14:29:53
#3758 new defect
rtems-tools: Trace linker wrapper with trace buffer fails to compile in 4.11
Reported by: | Martin Erik Werner | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | tool | Version: | 4.11 |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
Using rtems-tools 4.11 and enabling the trace buffer generator, I'm getting errors like this:
or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c: In function '__rtld_tbg_in_irq': or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c:159:10: error: '_ISR_Nest_level' undeclared (first use in this function) or1k-aac-rtems4.11-gcc: return _ISR_Nest_level ? (1 << 31) : 0; or1k-aac-rtems4.11-gcc: ^ or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c:159:10: note: each undeclared identifier is reported only once for each function it appears in or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c: In function '__rtld_tbg_executing_id': or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c:164:10: error: '_Thread_Executing' undeclared (first use in this function) or1k-aac-rtems4.11-gcc: return _Thread_Executing->Object.id; or1k-aac-rtems4.11-gcc: ^ or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c: In function '__rtld_tbg_executing_status': or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c:170:11: error: '_Thread_Executing' undeclared (first use in this function) or1k-aac-rtems4.11-gcc: return (_Thread_Executing->current_priority << 8) | _Thread_Executing->real_priority; or1k-aac-rtems4.11-gcc: ^ or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c: In function '__rtld_tbg_executing_state': or1k-aac-rtems4.11-gcc: /tmp/rld--Ixtaaa.c:175:10: error: '_Thread_Executing' undeclared (first use in this function) or1k-aac-rtems4.11-gcc: return _Thread_Executing->current_state; or1k-aac-rtems4.11-gcc: ^ error: compiling wrapper: Compiler error
These errors are probably not present in the rtems-tools master branch (I know that using rtems-tools master on rtems 4.11 has worked previously).
I'm guessing that this could either be fixed by adding something like
header = '#include <rtems/score/percpu.h>'
in rtld-trace-buffer.ini
or by backporting the following change from the rtems-tools master branch to 4.11:
https://git.rtems.org/rtems-tools/commit/linkers/rtld-trace-buffer.ini?id=f11d18b9b1f438b2dc83b92e39d945d5ac654bbd
which seems to have the necessary includes in place.
Note: See
TracTickets for help on using
tickets.