-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clang builds don't enable additional config options #136
Comments
@gctucker Potentially this is something in kci_build? |
I'll take a look but it would be surprising that only CPU_BIG_ENDIAN doesn't work while there hasn't been any issues with the other extra config options in the past. |
I've reproduced this problem with a build on staging, this defconfig doesn't have CPU_BIG_ENDIAN enabled:
even though it's in the frag.config: When I run it locally it does enable it in the |
I suspect it's not only CPU_BIG_ENDIAN, it's just very visible on CPU_BIG_ENDIAN due to the fact that failing to set that option causes us to fail to boot userspace whereas many other options could reasonably be off and won't stop things booting. |
OK I've found several different issues in various places: The first one is that running The second issue is that the kernel Makefile doesn't take into account the HOSTCC set in the environment when building some host tools such as The third issue which I haven't addressed is that
But then |
set -e sounds like it's enough (it tends to be my default thing for shell scripts if I CBA writing error handling anyway and I'm not sure what much more could be done). |
Some pushback from Yamada-san, he has a version of my patch which he prefers (and which I prefer as well TBH, I wrote it the way I did since it seemed more idiomatic) and he thinks Guillame's fix should be done in KernelCI. |
I guess we can first fix this in KernelCI (with a Makefile or something) and then see if the fix can get merged upstream in the kernel. |
The However a fix is still needed as per the previous comment (i.e. call the script from |
I think everything is now sorted here, at least for mainline and -next so we can close this? |
@broonie Well, no it's still not working. We still can't build say, defconfig + CONFIG_CPU_BIG_ENDIAN=y with clang when gcc is not present because merge_config.sh calls make and relies on gcc to be there by default. |
I thought we'd fixed that by ensuring that GCC would in fact be there? A bit of a workaround but effective. |
Unfortunately, adding GCC to the Clang Docker image is not a way to fix the problem. @nickdesaulniers Now that |
I've verified locally that |
It appears that clang builds for configurations which enable additional configuration options don't actually enable those options. For example:
https://storage.kernelci.org/next/master/next-20190807/arm64/defconfig+CONFIG_CPU_BIG_ENDIAN=y/clang-8/build.log
at no point enables CONFIG_CPU_BIG_ENDIAN resulting in a config:
https://storage.kernelci.org/next/master/next-20190807/arm64/defconfig+CONFIG_CPU_BIG_ENDIAN=y/clang-8/kernel.config
where CPU_BIG_ENDIAN is not set. In contrast the equivalent GCC build does have it set in the generated config. I'm not seeing any visible difference in the start of the build logs.
@mattface
The text was updated successfully, but these errors were encountered: