mirror of https://gitee.com/openkylin/dkms.git
Use exact compiler for dkms as used to build the kernel
Ubuntu kernel builds do not export .kernelvariables file, thus extend CC detection to read compiler binary from the .config file Gbp-Pq: Name exact-cc.patch
This commit is contained in:
parent
16e620274f
commit
ffec765dc5
7
dkms.in
7
dkms.in
|
@ -1006,6 +1006,13 @@ actual_build()
|
|||
unset CC
|
||||
fi
|
||||
|
||||
if [[ -e $kernel_source_dir/.config ]]; then
|
||||
cc=$(sed -n 's|^CONFIG_CC_VERSION_TEXT="\([^ ]*\) .*"|\1|p' $kernel_source_dir/.config)
|
||||
if command -v "$cc" >/dev/null; then
|
||||
export CC="$cc"
|
||||
fi
|
||||
fi
|
||||
|
||||
invoke_command "$clean" "Cleaning build area" background
|
||||
echo $"DKMS make.log for $module-$module_version for kernel $kernelver ($arch)" >> "$build_log"
|
||||
date >> "$build_log"
|
||||
|
|
Loading…
Reference in New Issue