[llvmlinux] status on 4.16 and asking for hints on AMD_DC_DCN1_0 issue

Lukas Bulwahn 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:

  - x86
    - defconfig:
      - builds without extra patches
    - allyesconfig:
      - CONFIG_EXOFS_FS:
        - apply commit 18345dd8790c ("exofs: avoid VLA in structures") 
          from linux-next [1] 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.
      - CONFIG_VIDEO_QCOM_CAMSS:
        - compiler issue is solved with the current clang-7,
          either use clang-7 or disable config
    - allnoconfig:
      - 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 [2]

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:

  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c
  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_math.c
  drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calc_auto.c
  drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dml1_display_rq_dlg_calc.c

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 
investigating.

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.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=18345dd8790ce44884e2ef6f320726703ac77c71
[2] https://lists.linuxfoundation.org/pipermail/llvmlinux/2018-February/001551.html


Best regards,

Lukas


More information about the LLVMLinux mailing list