Hi, I am experimenting with clang to compile an upstream Linux kernel v4.14.y (here: y=54). For this I use bindeb-pkg make-target from Linus upstream.
After installing the generated linux-headers and linux-image amd64 packages, the dkms kernel-modules were built with gcc-7 which defaults to gcc. As a result acpi-call and virtualbox dkms modules do not load (see [1]). As a workaround I have symlinked my mycompiler wrapper-script to /usr/bin/gcc. That works. What is the recommended way to do this correctly? Is there an CC option for dkms.conf? Use the update-alternatives system for configuring/installing clang as an cc-alternative? Thanks. Regards, - Sedat - [1] https://lkml.org/lkml/2018/6/1/724 [2] https://stackoverflow.com/questions/7832892/how-to-change-the-default-gcc-compiler-in-ubuntu P.S.: Some instructions and informations which might be helpful root@iniza# LANG=C update-alternatives --display cc cc - auto mode link best version is /usr/bin/gcc link currently points to /usr/bin/gcc link cc is /usr/bin/cc /usr/bin/gcc - priority 20 root# dpkg --purge tp-smapi-dkms <--- XXX: Does not work with Lenovo ThinkPad T470 root# dkms status -k 4.14.54-1-iniza-llvmlinux acpi-call, 1.1.0, 4.14.54-1-iniza-llvmlinux, x86_64: installed virtualbox, 5.2.10, 4.14.54-1-iniza-llvmlinux, x86_64: installed root# dkms remove acpi-call -v 1.1.0 -k 4.14.54-1-iniza-llvmlinux root# dkms remove virtualbox -v 5.2.10 -k 4.14.54-1-iniza-llvmlinux root# cat /usr/bin/mycompiler #!/bin/bash ccache clang-7 "$@" root# cd /usr/bin ; ln -sf mycompiler gcc <--- XXX: Workaround root# LANG=C dkms install acpi-call -v 1.1.0 -k 4.14.54-1-iniza-llvmlinux root# LANG=C dkms install virtualbox -v 5.2.10 -k 4.14.54-1-iniza-llvmlinux root# cd /usr/bin ; ln -sf gcc-7 gcc <--- XXX: System default