You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When I build the hello_world sample for native_sim with CONFIG_FPU and CONFIG_FPU_SHARING enabled, the compiler throws an error. I am checked out on Zephyr 53738cf92479610bcf79fe738636a2b920224a36.
To Reproduce
Run the following command: west build samples/hello_world -b native_sim -p -- -DCONFIG_FPU=y -DCONFIG_FPU_SHARING=y
Expected behavior
I would expect it to build successfully.
Logs and console output
Compiler output:
FAILED: zephyr/CMakeFiles/native_runner_executable zephyr/zephyr.exe /home/project/zephyr/build/zephyr/CMakeFiles/native_runner_executable /home/project/zephyr/build/zephyr/zephyr.exe
cd /home/project/zephyr/build/zephyr && /usr/bin/make -f /home/project/zephyr/scripts/native_simulator/Makefile all --warn-undefined-variables -r NSI_CONFIG_FILE=/home/project/zephyr/build/zephyr/NSI/nsi_config
/usr/bin/ld: /home/project/zephyr/build/zephyr/NSI/home/project/zephyr/build/zephyr/zephyr.elf.loc_cpusw.o: in function `halt_thread':
/home/project/zephyr/kernel/sched.c:1372: undefined reference to `arch_float_disable'
collect2: error: ld returned 1 exit status
make: *** [/home/project/zephyr/scripts/native_simulator/Makefile:131: /home/project/zephyr/build/zephyr/zephyr.exe] Error 1
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/project/zephyr/build
Additional context
I added the following to zephyr/arch/posix/core/thread.c but I am not sure if this is correct.
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
int arch_float_disable(struct k_thread *thread)
{
/* Posix always has FPU enabled so cannot be disabled */
return -ENOTSUP;
}
int arch_float_enable(struct k_thread *thread, unsigned int options)
{
/* Posix always has FPU enabled so nothing to do here */
return 0;
}
#endif /* CONFIG_FPU && CONFIG_FPU_SHARING */
The text was updated successfully, but these errors were encountered:
Describe the bug
When I build the hello_world sample for native_sim with
CONFIG_FPU
andCONFIG_FPU_SHARING
enabled, the compiler throws an error. I am checked out on Zephyr53738cf92479610bcf79fe738636a2b920224a36
.To Reproduce
Run the following command:
west build samples/hello_world -b native_sim -p -- -DCONFIG_FPU=y -DCONFIG_FPU_SHARING=y
Expected behavior
I would expect it to build successfully.
Logs and console output
Compiler output:
Additional context
I added the following to
zephyr/arch/posix/core/thread.c
but I am not sure if this is correct.The text was updated successfully, but these errors were encountered: