[bsp][qemu-virt64-riscv] Allow optional C-only Picolibc builds - #11849
deepai-org wants to merge 1 commit into
Conversation
|
👋 感谢您对 RT-Thread 的贡献!Thank you for your contribution to RT-Thread! 为确保代码符合 RT-Thread 的编码规范,请在你的仓库中执行以下步骤运行代码格式化工作流(如果格式化CI运行失败)。 🛠 操作步骤 | Steps
完成后,提交将自动更新至 如有问题欢迎联系我们,再次感谢您的贡献!💐 |
|
kevin seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account. You have signed the CLA already but the status is still pending? Let us recheck it. |
|
这份PR是完全AI给出的?需要后面的人来认领下 |
拉取/合并请求描述:(PR description)
为什么提交这份PR (why to submit this PR)
The QEMU RV64 BSP unconditionally links
libsupc++, even for a C-onlyconfiguration. This prevents using a C-only GNU/Picolibc toolchain. Selecting
an external Picolibc specs file also currently requires editing
rtconfig.py.你的解决方案是什么 (what is your solution)
RTT_PICOLIBC_SPECSenvironment variable and pass it tocompilation, assembly and linking. Unset/empty leaves libc selection unchanged.
-lsupc++only whenRT_USING_CPLUSPLUSis disabled. C++ configurationsretain the original linker flags and existing G++ driver selection.
No libc sources, default configuration, ISA/ABI, or other BSPs change.
AI assistance was used to prepare and validate this patch.
请提供验证的bsp和config (provide the config and bsp)
bsp/qemu-virt64-riscv, standard RT-Thread (not RT-Smart).RT_USING_UTESTCASES,RT_USING_CI_ACTION,UTEST_THR_STACK_SIZE=8192, andRT_UTEST_{TIMER,OBJECT,THREAD,ATOMIC,SCHEDULER,SEMAPHORE,EVENT,MESSAGEQUEUE,MUTEX,MAILBOX}.C++ disabled. Built with GNU RV64 GCC 13.2.0 and Picolibc at
764ef4e401a8f4c6a86ab723533841f072885a5b, configured for lp64, withoutTLS, multilib, picocrt or semihosting. Set
RTT_PICOLIBC_SPECSto theabsolute installed
lib/picolibc.specspath, then runscons --pyconfig-silentandscons -j4.Boot command:
qemu-system-riscv64 -nographic -monitor none -M virt -m 256M -smp 1 -bios default -kernel rtthread.bin -nic none.All 18 upstream utest cases passed (91 unit invocations), including atomic,
IPC, scheduler stress, thread and timer cases.
Separate flag checks covered unset/empty/explicit specs and C++ disabled/enabled;
default compiler flags and C++ linker flags are preserved. This is not a
C++ runtime, TLS or RT-Smart validation claim. The build retains the existing
linker warning about an RWX LOAD segment.
The clang-format and new-BSP checklist items are not applicable: this changes
only two existing Python/SCons build files, not C/C++ sources or a new BSP.
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up