[Mageia-dev] problem with %_smp_mflags in Cauldron

Pascal Terjan pterjan at gmail.com
Sun Jan 6 17:51:07 CET 2013


On Sun, Jan 6, 2013 at 3:13 PM, philippe makowski
<makowski.mageia at gmail.com> wrote:
> Hi,
>
> 2013/1/6 Pascal Terjan <pterjan at gmail.com>:
>> So far only waf should be a problem. Maybe we could add a macro with
>> only the number of cpus and use -j%n_cpus with waf instead of using
>> the make flags given that it is not compatible with other make
>> options? (In smp_mflags the second m is for make)
> That' s fine for me

Anyone against such patch? I would change _smp_mflags to %([
%_build_ncpus -gt 1 ] && echo "-j%_build_ncpus -l%_build_ncpus") later

[pterjan at chopin trunk]$ svn diff
Index: build.macros.in
===================================================================
--- build.macros.in	(revision 7023)
+++ build.macros.in	(working copy)
@@ -207,9 +207,10 @@
 %{nil}


-%_smp_mflags %([ -z "$RPM_BUILD_NCPUS" ] \\\
-	&& RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"; \\\
-	[ "$RPM_BUILD_NCPUS" -gt 1 ] && echo "-j$RPM_BUILD_NCPUS")
+# Define _build_ncpus which can be reused with non-make build systems
+# Needs to be sent upstream
+%_build_ncpus		%([ -n "$RPM_BUILD_NCPUS" ] && echo "$RPM_BUILD_NCPUS"
|| /usr/bin/getconf _NPROCESSORS_ONLN)
+%_smp_mflags		%([ %_build_ncpus -gt 1 ] && echo "-j%_build_ncpus")

 %_make_bin make
 %make %{_make_bin} %_smp_mflags


More information about the Mageia-dev mailing list