Repository navigation
include/nuttx/compiler.h: use the user label prefix in asm labels. - #21498
Conversation
|
Adding @xiaoxiang781216 @raiden00pl @casaroli for review. Thanks. |
|
9386470
57f7c25 to
9386470
Compare
|
The CI failure came from macro.h in compiler.h clashing with STRINGIFY in OpenSBI, the NMSIS headers and CPython. It now uses a local stringify. the board commit is dropped. The failing configs build now. Please re-trigger the CI. |
casaroli
left a comment
There was a problem hiding this comment.
The PR body describes the old version. It says "compiler.h now builds those names with USER_LABEL_PREFIX and STRINGIFY from nuttx/macro.h", "The first commit drops the local STRINGIFY of six BBSRAM/SBRAM board files", "Programs built with NUTTX_NO_EXTENSIONS now also see the macro.h names." and tests "nucleo-f429zi with BBSRAM ... without the first commit". The PR now has one commit, a local stringify, no macro.h and no board files.
Fix: update the Summary, Impact and Testing sections to the current commit.
v850 GCC prefixes C symbols with "_". The asm names in the builtin and fortify wrappers now take the prefix into account, through a local two-step stringify, so compiler.h does not define STRINGIFY for every file that includes it. Targets without a prefix get the same names as before. Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
9386470 to
f183ecb
Compare
Thanks for the review. Updated. |
Summary
v850 GCC adds "_" in front of C symbols (USER_LABEL_PREFIX), so the asm labels used by fortify_real and builtin_original did not match and string.h failed to link. Add the prefix to those labels. If the compiler does not define USER_LABEL_PREFIX, nothing changes.
Impact
None for targets without a prefix. Needed by the RH850 port (#21456).
Testing
Built the configs that failed CI before, plus sim:nsh and stm32f4discovery:nsh, in the CI image. RH850 qemu-rh850-u2c ostest passes on QEMU.