jjb: use no-pie only when gcc != 4.8
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 26 Feb 2019 15:33:37 +0000 (10:33 -0500)
committerMichael Jeanson <mjeanson@efficios.com>
Tue, 26 Feb 2019 15:33:37 +0000 (10:33 -0500)
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/lttng-modules/param-build.sh

index f50a5cd6f8ea9293a3ed868142f818fa24a966c9..93b583e9fde3f1b57ab4748708618caac62ec3da 100644 (file)
@@ -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
This page took 0.024636 seconds and 4 git commands to generate.