From: Michael Jeanson Date: Tue, 26 Feb 2019 21:02:05 +0000 (-0500) Subject: jjb: fix multiple kernel build errors X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1d5a0a3c0ba014a5fe9924afda61cbb3a1b72f22;p=lttng-ci.git jjb: fix multiple kernel build errors Signed-off-by: Michael Jeanson --- diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index 9169314..86efc71 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -1,6 +1,6 @@ #!/bin/bash -exu # -# Copyright (C) 2016-2018 - Michael Jeanson +# Copyright (C) 2016-2019 - Michael Jeanson # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -92,7 +92,7 @@ select_compiler() { set +e - for cc in gcc-7 gcc-5 gcc-4.8; do + for cc in gcc-5 gcc-4.8; do if "${CROSS_COMPILE:-}${cc}" -I include/ -D__LINUX_COMPILER_H -D__LINUX_COMPILER_TYPES_H -E include/linux/compiler-gcc.h; then selected_cc="$cc" break @@ -106,21 +106,11 @@ select_compiler() { exit 1 fi - # Force gcc-4 for buggy kernel branches - if { vergte "$kversion" "3.2" && verlt "$kversion" "3.3"; } || \ - { vergte "$kversion" "3.4" && verlt "$kversion" "3.5"; } || \ - { vergte "$kversion" "3.17" && verlt "$kversion" "3.18"; }; then + # Force gcc-4.8 for kernels before 3.18 + if { verlt "$kversion" "3.18"; }; then selected_cc=gcc-4.8 fi - case "$ktag" in - Ubuntu*) - if { vergte "$kversion" "3.13" && verlt "$kversion" "3.14"; }; then - selected_cc=gcc-4.8 - fi - ;; - esac - if [ "$selected_cc" != "gcc-4.8" ]; then # Older kernel Makefiles do not expect the compiler to default to PIE KAFLAGS="-fno-pie" @@ -130,6 +120,7 @@ select_compiler() { fi export CC="${CROSS_COMPILE:-}${selected_cc}" + export HOSTCC="${selected_cc}" cd - } @@ -216,6 +207,9 @@ build_linux_kernel() { # Cause problems with inline assembly on i386 sed -i "s/CONFIG_DEBUG_SECTION_MISMATCH=y/# CONFIG_DEBUG_SECTION_MISMATCH is not set/g" .config + # Don't build samples, they are broken on some kernel releases + sed -i "s/CONFIG_SAMPLES=y/# CONFIG_SAMPLES is not set/g" .config + # IGBVF won't build with recent gcc on 2.6.38.x if { vergte "$kversion" "2.6.37" && verlt "$kversion" "2.6.38"; }; then sed -i "s/CONFIG_IGBVF=y/# CONFIG_IGBVF is not set/g" .config