Commit 67bccc2
test: ztest: Remove explicit math library linking for native_sim
Remove explicit linking of math library (-lm) from advanced math
function tests to fix native_sim build failures.
The explicit target_link_libraries(app PRIVATE m) caused linker errors
with __x86.get_pc_thunk.bx symbols in Zephyr's native_sim builds. This
occurs because native_sim's build system already handles math library
linkage, and explicitly adding it creates conflicting symbol references
during the final native simulator linking stage.
The math library functions (exp, pow, log2, etc.) used in tests are
still available as Zephyr automatically links libm for native_sim
targets.
Error example:
`__x86.get_pc_thunk.bx' referenced in section `.text' of
zephyr.elf.loc_cpusw.o: defined in discarded section
`.text.__x86.get_pc_thunk.bx[__x86.get_pc_thunk.bx]'
Related: zephyrproject-rtos/zephyr#97999
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>1 parent 1c56e1a commit 67bccc2
1 file changed
Lines changed: 0 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
40 | | - | |
41 | | - | |
0 commit comments