From 3b4ba67d8b159bb52b5318fbe8da93c24ee1d784 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 6 Jun 2020 17:09:44 +0000 Subject: [PATCH 1/2] scripts: Rework the approach for building older kernels with a recent gcc Instead of setting KCFLAGS, modify include/linux/compiler-gcc.h. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9003 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scripts/kernel-functions | 25 +++++++++++++++++++++++++ scripts/run-regression-tests | 9 --------- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/scripts/kernel-functions b/scripts/kernel-functions index a3d02137d..bab8c2c60 100644 --- a/scripts/kernel-functions +++ b/scripts/kernel-functions @@ -127,6 +127,31 @@ function extract_kernel_tree { # Patch a kernel tree where $1 is the kernel version. function patch_kernel { + case "$k" in + *^*) + # RHEL / CentOS. + ;; + 2.*|3.*) + # Tell the kernel that we are using gcc 4.6 since older kernel + # versions do not support recent gcc versions. + KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6" + patch -p1 <<'EOF' +diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h +index 02ae99e8e6d3..47e12c19c965 100644 +--- a/include/linux/compiler-gcc.h ++++ b/include/linux/compiler-gcc.h +@@ -103,7 +103,7 @@ + #define __gcc_header(x) #x + #define _gcc_header(x) __gcc_header(linux/compiler-gcc##x.h) + #define gcc_header(x) _gcc_header(x) +-#include gcc_header(__GNUC__) ++#include "linux/compiler-gcc4.h" + + #if !defined(__noclone) + #define __noclone /* not needed */ +EOF + esac + if [ "$1" = "2.6.29" ] || [ "$1" = "2.6.29.1" ] || [ "$1" = "2.6.29.2" ] || [ "$1" = "2.6.29.3" ]; then patch -f -s -p1 <<'EOF' diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index 1de609dc2..ad40ace16 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -695,15 +695,6 @@ do run_checkpatch "$k" fi patch_and_configure_kernel "$k" || continue - case "$k" in - *^*) - # CentOS. - ;; - 2.*|3.*) - # Tell the kernel that we are using gcc 4.6 since older kernel - # versions do not suppor recent gcc versions. - KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6" - esac case "$k" in 3.10.0-*) # Make the CentOS 7.x build less noisy. From bb1b1ba1625f8e090ee0f0918f526531f8d96d20 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sat, 6 Jun 2020 22:56:29 +0000 Subject: [PATCH 2/2] nightly build: Update kernel versions git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@9004 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- nightly/conf/nightly.conf | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/nightly/conf/nightly.conf b/nightly/conf/nightly.conf index 5ccd9d616..db16d5652 100644 --- a/nightly/conf/nightly.conf +++ b/nightly/conf/nightly.conf @@ -3,30 +3,31 @@ ABT_DETAILS="x86_64" ABT_JOBS=5 ABT_KERNELS=" \ -5.6.15 \ +5.7 \ +5.6.16-nc \ 5.5.19-nc \ -5.4.43-nc \ +5.4.44-nc \ 5.3.18-nc \ 5.2.21-nc \ 5.1.21-nc \ 5.0.21-nc \ 4.20.17-nc \ -4.19.125-nc \ +4.19.126-nc \ 4.18.20-nc \ 4.17.19-nc \ 4.16.18-nc \ 4.15.18-nc \ -4.14.182-nc \ +4.14.183-nc \ 4.13.16-nc \ 4.12.14-nc \ 4.11.12-nc \ 4.10.17-nc \ -4.9.225-nc \ +4.9.226-nc \ 4.8.17-nc \ 4.7.10-nc \ 4.6.7-nc \ 4.5.7-nc \ -4.4.225-nc \ +4.4.226-nc \ 4.3.6-nc \ 4.2.8-nc \ 4.1.52-nc \