X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=scripts%2Flttng-modules%2Fparam-build.sh;h=b5c8b8f8b598a855a1fd56d342c333d06808ed92;hb=52544ed374c757be97b5720237226b436cd96906;hp=ef7a3d0d8fa021b8b8ed194f1dfa9bd6e87366d5;hpb=c72041ebe744c7c3fd8411fafd93abe46292bff4;p=lttng-ci.git diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index ef7a3d0..b5c8b8f 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -94,6 +94,16 @@ tar_archive_obj() { cd - } +list_gccs() { + local gccs + gccs=() + IFS=: read -r -a path_array <<< "$PATH" + while read -r gcc ; do + gccs+=("$gcc") + done < <(find "${path_array[@]}" -maxdepth 1 -regex '.*/gcc-[0-9\.]+$' -printf '%f\n' | sort -t- -k2 -V -r) + echo "${gccs[@]}" +} + # Find the most recent GCC version supported by the kernel sources select_compiler() { local selected_cc @@ -104,7 +114,7 @@ select_compiler() { set +e - for cc in gcc-8 gcc-5 gcc-4.8; do + for cc in $(list_gccs) ; 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 @@ -285,6 +295,11 @@ build_linux_kernel() { # FIXME: disable objtool on vmlinux, it OOMs on allyesconfig sed -i 's/objtool_link vmlinux.o//' scripts/link-vmlinux.sh || true + # Starting with v6.1-rc6 + sed -i 's/^objtool-enabled := .*/objtool-enabled := /' scripts/Makefile.vmlinux_o || true + + # Disable SORTTAB + sed -i 's/is_enabled CONFIG_BUILDTIME_TABLE_SORT/is_enabled CONFIG_NONEXISTANT/' scripts/link-vmlinux.sh || true # Debug #cat .config @@ -633,12 +648,16 @@ fi obj_url="$obj_url_prefix/$obj_name" set +e -s3cmd -c "$WORKSPACE/.s3cfg" get "$obj_url" +# In s3cmd 2.3, the return code of get when an object does not exist (64) +# is different than in 2.2 (12). The return codes of 's3cmd info' are +# consistent between 2.2 and 2.3. +s3cmd -c "$WORKSPACE/.s3cfg" info "$obj_url" ret=$? set -e case "$ret" in "0") + s3cmd -c "$WORKSPACE/.s3cfg" get "$obj_url" extract_archive_obj ;;