From 1eab0c8a2baacc1edd23db992a4996d152e6834e Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Sun, 2 Nov 2014 21:29:01 +0200 Subject: [PATCH] ofed_scripts: Pass correct kernel source/obj parameters Signed-off-by: Vladimir Sokolovsky --- compat-rdma.spec | 5 +++-- configure | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/compat-rdma.spec b/compat-rdma.spec index fc47b53..ffbb14c 100755 --- a/compat-rdma.spec +++ b/compat-rdma.spec @@ -75,7 +75,8 @@ %{!?RDMA_CONF_DIR: %define RDMA_CONF_DIR /etc/infiniband} %{!?MLXNET_CONF_DIR: %define MLXNET_CONF_DIR /etc/mlxethernet} -%{!?K_SRC: %define K_SRC /lib/modules/%{KVERSION}/build} +%{!?K_SRC: %define K_SRC /lib/modules/%{KVERSION}/source} +%{!?K_SRC_OBJ: %define K_SRC_OBJ /lib/modules/%{KVERSION}/build} %{!?KERNEL_SOURCES: %define KERNEL_SOURCES /lib/modules/%{KVERSION}/source} @@ -143,7 +144,7 @@ mkdir -p $RPM_BUILD_DIR/src cp -a $RPM_BUILD_DIR/%{_name}-%{_version} $RPM_BUILD_DIR/src/ %endif -./configure --prefix=%{_prefix} --kernel-version %{KVERSION} --kernel-sources %{K_SRC} --modules-dir %{LIB_MOD_DIR} %{configure_options} +./configure --prefix=%{_prefix} --kernel-version %{KVERSION} --with-linux %{K_SRC} --with-linux-obj %{K_SRC_OBJ} --modules-dir %{LIB_MOD_DIR} %{configure_options} %if %{build_kernel_ib_devel} # Copy InfniBand include files after applying backport patches (if required) diff --git a/configure b/configure index 9079de4..2342393 100755 --- a/configure +++ b/configure @@ -284,10 +284,18 @@ main() shift KSRC=$1 ;; + --with-linux=*) + shift + KSRC=`expr "x$1" : 'x[^=]*=\(.*\)'` + ;; --with-linux-obj) shift KSRC_OBJ=$1 ;; + --with-linux-obj=*) + shift + KSRC_OBJ=`expr "x$1" : 'x[^=]*=\(.*\)'` + ;; -with-quilt | --with-quilt) ofed_patch_params="$ofed_patch_params $1" if [ ! -z "$2" ] && [ "`echo -n $2 | cut -c 1`" != '-' ]; then -- 2.46.0