From: James Simmons Date: Wed, 20 Nov 2013 12:51:21 +0000 (-0500) Subject: LU-1199 rpm: don't open-code %_smp_mflags X-Git-Tag: 2.5.52~36 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=ad82976ca7747d004f9dea55e2d2b27460842914;hp=b498499104af17da081f1c22b9c07951104846a3 LU-1199 rpm: don't open-code %_smp_mflags In some distant past, %_smp_mflags didn't exist on all supported platforms. We can use it now. The only difference is the lack of an 8-CPU limit, which can be overridden by explicitly defining RPM_BUILD_NCPUS anyway. Signed-off-by: Jeff Mahoney Signed-off-by: James Simmons Change-Id: I0b5c2f879da9ba6e8aa3103bfe59e6b43f8d72bc Reviewed-on: http://review.whamcloud.com/5492 Tested-by: Jenkins Reviewed-by: Christopher J. Morrone Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Andreas Dilger --- diff --git a/lustre.spec.in b/lustre.spec.in index 4f5b05b..48f5b17 100644 --- a/lustre.spec.in +++ b/lustre.spec.in @@ -259,16 +259,6 @@ ln lustre/ChangeLog ChangeLog-lustre ln lnet/ChangeLog ChangeLog-lnet %build -# if RPM_BUILD_NCPUS unset, set it -if [ -z "$RPM_BUILD_NCPUS" ] ; then - RPM_BUILD_NCPUS=$(egrep -c "^cpu[0-9]+" /proc/stat 2>/dev/null || echo 0 :) - if [ $RPM_BUILD_NCPUS -eq 0 ] ; then - RPM_BUILD_NCPUS=1 - fi - if [ $RPM_BUILD_NCPUS -gt 8 ] ; then - RPM_BUILD_NCPUS=8 - fi -fi # Set an explicit path to our Linux tree, if we can. cd $RPM_BUILD_DIR/lustre-%{version} @@ -306,7 +296,7 @@ CONFIGURE_ARGS=$(echo $CONFIGURE_ARGS | sed -e 's/"\?--with-kmp-moddir=[^ ][^ ]* %eval_configure \ %{?kdir: --with-linux=%kdir} %{?kobjdir: --with-linux-obj=%kobjdir} \ $CONFIGURE_ARGS --with-kmp-moddir=%{kmoddir} -make -j $RPM_BUILD_NCPUS -s %{?make_args} +make %{?_smp_mflags} -s %{?make_args} %install make install DESTDIR=$RPM_BUILD_ROOT