From 04873cc390268e8430cd2d4bdc9ff810071fb2a7 Mon Sep 17 00:00:00 2001 From: Michael Jeanson Date: Thu, 17 Oct 2019 16:32:43 -0400 Subject: [PATCH] jjb: Fix ppc64el linux build for modules Signed-off-by: Michael Jeanson --- scripts/lttng-modules/param-build.sh | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/lttng-modules/param-build.sh b/scripts/lttng-modules/param-build.sh index 21e219c..e016e13 100644 --- a/scripts/lttng-modules/param-build.sh +++ b/scripts/lttng-modules/param-build.sh @@ -312,9 +312,11 @@ extract_distro_headers() { rm -f "${LINUX_HDROBJ_DIR}/scripts/*.o" rm -f "${LINUX_HDROBJ_DIR}/scripts/*/*.o" - # On powerpc this object is required to link modules + # On powerpc 32bits this object is required to link modules if [ "${karch}" = "powerpc" ]; then - cp -a --parents arch/powerpc/lib/crtsavres.[So] "${LINUX_HDROBJ_DIR}/" + if [ "x$(scripts/config -s CONFIG_PPC64)" = "xn" ]; then + cp -a --parents arch/powerpc/lib/crtsavres.[So] "${LINUX_HDROBJ_DIR}/" + fi fi # On arm64 between 4.13 and 1.15 this object is required to build with ftrace support @@ -370,9 +372,11 @@ extract_distro_headers() { # And regen the modules support files make modules_prepare CC="$CC" - # On powerpc this object is required to link modules + # On powerpc 32bits this object is required to link modules if [ "${karch}" = "powerpc" ]; then - make arch/powerpc/lib/crtsavres.o CC="$CC" + if [ "x$(scripts/config -s CONFIG_PPC64)" = "xn" ]; then + make arch/powerpc/lib/crtsavres.o CC="$CC" + fi fi # On arm64 between 4.13 and 4.15 this object is required to build with ftrace support @@ -558,7 +562,7 @@ elif [ "x${arch}" != "x" ]; then ;; esac else - echo "Not arch or cross_arch specified" + echo "No arch or cross_arch specified" exit 1 fi -- 2.34.1