From 425e4992aaa57ae9b426909ff216921963d89f39 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Tue, 26 Feb 2019 10:33:37 -0500 Subject: [PATCH] jjb: use no-pie only when gcc != 4.8 Signed-off-by: Michael Jeanson --- scripts/lttng-modules/param-build.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index f50a5cd..93b583e 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -121,6 +121,14 @@ select_compiler() { ;; esac + if [ "$selected_cc" != "gcc-4.8" ]; then + # Older kernel Makefiles do not expect the compiler to default to PIE + KAFLAGS="-fno-pie" + KCFLAGS="-fno-pie -no-pie" + KCPPFLAGS="-fno-pie" + export KAFLAGS KCFLAGS KCPPFLAGS + fi + export CC="${CROSS_COMPILE:-}${selected_cc}" cd - @@ -427,12 +435,6 @@ LINUX_GIT_REF_REPO_DIR="$HOME/gitcache/linux-stable.git/" OBJ_STORE_URL="s3://jenkins" -# Older kernel Makefiles do not expect the compiler to default to PIE -KAFLAGS="-fno-pie" -KCFLAGS="-fno-pie -no-pie" -KCPPFLAGS="-fno-pie" -export KAFLAGS KCFLAGS KCPPFLAGS - cd "$WORKSPACE" # Create build directories -- 2.34.1