[llvmlinux] status on 4.16 and asking for hints on AMD_DC_DCN1_0 issue
lukas.bulwahn at gmail.com
Wed Jun 13 16:31:06 UTC 2018
Hi Nick, hi Matthias,
we, my student Ozan Alpay and I, were trying to determine the current
state of issues compiling the kernel 4.16 with clang. We limited our
investigation to x86 for now.
Status of v4.16:
- builds without extra patches
- apply commit 18345dd8790c ("exofs: avoid VLA in structures")
from linux-next  to remove the VLAIS in exofs
- CONFIG_DRM_AMD_DC_DCN1_0 ("DCN 1.0 Raven Family Graphics driver support"):
- cherry-pick commit 37172013fa2e ("amdgpu/dc/calcs: Consolidate redundant CFLAGS")
- cherry-pick commit cc32ad8f559c ("amdgpu/dc/calcs: Support clang option for stack alignment")
- cherry-pick commit a27267e01ffa ("drm/amd/display: dc: Remove unused display_mode_vba.c")
- cherry-pick commit 4007e92bebeb ("amdgpu/dc/dml: Consolidate redundant CFLAGS")
- cherry-pick commit 4769278e5c7f ("amdgpu/dc/dml: Support clang option for stack alignment")
- still remains to fail during linking with the errors below.
- compiler issue is solved with the current clang-7,
either use clang-7 or disable config
- apply patch "[llvmlinux] [RFC HACK] Make clang hate percpu.h less in 32-bit mode"
from David Woodhouse on February 9, 2018, on the llvmlinux mailing list 
We want to investigate this remaining build error in the DCN 1.0 Raven
Family Graphics driver support further.
After applying the patches mentioned above, the build with allyesconfig
then fails with linking errors due to undefined reference to
floating-point functions, i.e., __addsf3, __mulsf3, __divsf3, __floatsisf
and some more, in these four files:
Nick, Matthias, do you already have some hints or ideas on these errors?
We would be grateful for any hint in which direction we should start
We are aware that the current kernel does not compile with clang due to
missing asm-goto support, but tackling that task is too difficult for us.
We hope that we can solve the (hopefully comparatively easy) issue in the
DCN 1.0 Raven Family Graphics driver support and the clang developers will
eventually add asm-goto support soon as well.
More information about the LLVMLinux