X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-modules%2Fparam-build.sh;h=ef7a3d0d8fa021b8b8ed194f1dfa9bd6e87366d5;hb=c72041ebe744c7c3fd8411fafd93abe46292bff4;hp=e8709d2e0200bbbed7beda97d9b92d15442554ea;hpb=073dc82cb9f7d11e9ec54ae50225693b2bf265f2;p=lttng-ci.git diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index e8709d2..ef7a3d0 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -1,6 +1,6 @@ -#!/bin/bash -exu +#!/bin/bash # -# Copyright (C) 2016-2019 - 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 @@ -15,8 +15,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . +set -exu + # Parameters -arch=${arch:-} +arch=${arch:-amd64} cross_arch=${cross_arch:-} ktag=${ktag:-} kgitrepo=${kgitrepo:-} @@ -102,7 +104,7 @@ select_compiler() { set +e - for cc in gcc-5 gcc-4.8; do + for cc in gcc-8 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 @@ -265,6 +267,9 @@ build_linux_kernel() { scripts/config --disable CONFIG_IGBVF fi + # Don't fail the build on warnings + scripts/config --disable CONFIG_WERROR + # Set required options scripts/config --enable CONFIG_TRACEPOINTS scripts/config --enable CONFIG_KALLSYMS @@ -278,6 +283,9 @@ build_linux_kernel() { scripts/config --enable CONFIG_EVENT_TRACING scripts/config --enable CONFIG_KRETPROBES + # FIXME: disable objtool on vmlinux, it OOMs on allyesconfig + sed -i 's/objtool_link vmlinux.o//' scripts/link-vmlinux.sh || true + # Debug #cat .config @@ -385,7 +393,9 @@ extract_distro_headers() { touch -r "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/generated/autoconf.h" # Copy .config to include/config/auto.conf so "make prepare" is unnecessary. - cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf" + if [ ! -f "${LINUX_HDROBJ_DIR}/include/config/auto.conf" ]; then + cp "${LINUX_HDROBJ_DIR}/.config" "${LINUX_HDROBJ_DIR}/include/config/auto.conf" + fi # Finally clean the object files from the full source tree make clean @@ -429,6 +439,10 @@ build_modules() { kversion=$(make -C "$LINUX_HDROBJ_DIR" -s kernelversion) + # Try to catch some compatibility problems by turning some + # warnings into errors. + #export KCFLAGS="$KCFLAGS -Wall -Werror" + # Enter lttng-modules source dir cd "${MODULES_GIT_DIR}"