scripts/kernel-functions: Override kernel gcc version detection

Older kernels do not support recent gcc versions. Hence override the kernel
version when building against an older kernel.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8120 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-03-31 16:34:59 +00:00
parent 262c7f3b64
commit 6eb8e72ea6

View File

@@ -671,6 +671,12 @@ do
run_checkpatch "$k"
fi
patch_and_configure_kernel "$k"
case "$k" in
2.*|3.*)
# Tell the kernel that we are using gcc 4.6.
KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6"
export KCFLAGS;;
esac
subdirs=(drivers/scst)
if [ "${run_sparse}" = "true" ]; then
run_sparse "$k" "${subdirs[@]}"