fix: linux cross-build require CFLAGS_FOR_BUILD#30
Conversation
|
I think we should limit this CFLAGS to bash only. By the way, we use |
|
By the way, can you post the full error log, or reproduction environment? |
yes, im compiling with GCC 15 on archlinux. but im not sure which version of gcc introduced this issue. based on the discussion in the issue linked by my PR, it has been present at least since GCC 13. P.S., the error log is exactly the same as the one in the issue (i found that issue directly through Google search :P |
However, aren't we using cross compilation toolchain (Clang 14.0.5) from HarmonyOS Command Line Tools? |
indeed, but when i run it here, it ends up using the system's gcc. i'll look into the cause and get back to you. |
|
I think I found the reason: mkbuiltin is a part of the build process: it builds and runs on the x86 machine to generate code for cross compilation. |
fix: linux cross-build require CFLAGS_FOR_BUILD
building
bash-5.2on linux leads to these errors, see this issue.adding
CFLAGS_FOR_BUILD := -std=gnu17works for me.