On 12/13/25 22:06, Miguel Ojeda wrote:
On Sun, Dec 14, 2025 at 12:54 AM Rudraksha Gupta guptarud@gmail.com wrote:
- The kernel boots and outputs via UART when I build the kernel with the
following:
make LLVM=1 ARCH="$arm" CC="${CC:-gcc}"
- The kernel doesn't boot and there is no output via UART when I build
the kernel with the following:
make LLVM=1 ARCH="$arm"
The only difference being: CC="${CC:-gcc}". Is this expected?
It depends on what that resolves to, i.e. your environment etc., i.e. that is resolved before Kbuild is called.
Sorry about that, I should've specified in the original email. The CC resolves to armv7-alpine-linux-musleabihf-gcc.
When both LLVM=1 and the CC=gcc are used, I can insmod the sample rust modules just fine. However, if I only use LLVM=1, my phone doesn't output anything over UART, and I assume that it fails to boot. Interestingly enough, if I just specify LLVM=1 (with no CC=gcc), and remove the rust related configs from the pmos.config fragment, then my phone boots and I can see logs over UART.
The normal way of calling would be the latter anyway -- with the former you are setting a custom `CC` (either whatever you have there or the `gcc` default). By default, `LLVM=1` means `CC=clang`.
So it could be that you are using a completely different compiler (even Clang vs. GCC, or different versions, and so on). Hard to say. And depending on that, you may end up with a very different kernel image. Even substantial Kconfig options may get changed etc.
I would suggest comparing the kernel configuration of those two ways (attaching them here could also be nice to see what compilers you are using and so on).
postmarketOS uses kernel config fragments and tracks the latest linux-next:
- https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/t...
- https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/t...
- build recipe: https://gitlab.postmarketos.org/postmarketOS/pmaports/-/blob/master/device/t...
The only thing that changed was whether CC=gcc was specified or not:
https://gitlab.postmarketos.org/postmarketOS/pmaports/-/commit/b9102ac5718b8...
Cc'ing Kbuild too so that they are in the loop.
I hope that helps.
Thanks for your help! Always appreciate your presence. :)
Cheers, Miguel