#6 Set all build flags using %set_build_flags
Opened 2 years ago by tbaeder. Modified 2 years ago
rpms/ tbaeder/dmidecode rawhide  into  rawhide

file modified
+7 -3
@@ -1,7 +1,7 @@ 

  Summary:        Tool to analyse BIOS DMI data

  Name:           dmidecode

  Version:        3.3

- Release:        1%{?dist}

+ Release:        2%{?dist}

  Epoch:          1

  License:        GPLv2+

  Source0:        https://download.savannah.gnu.org/releases/%{name}/%{name}-%{version}.tar.xz
@@ -24,10 +24,11 @@ 

  %setup -q



- %make_build CFLAGS="%{optflags}" LDFLAGS="%{__global_ldflags}"

+ %set_build_flags

+ %make_build



- %make_install %{?_smp_mflags} prefix=%{_prefix} install-bin install-man

+ %make_install prefix=%{_prefix} install-bin install-man



@@ -41,6 +42,9 @@ 




+ * Thu May 20 2021 Timm Bäder <tbaeder@redhat.com> - 1:3.3-2

+ - Set all build flags using %%set_build_flags


  * Wed May 19 2021 Coiby Xu <coxu@redhat.com> - 1:3.3-1

  - updated to upstream v3.3

  - Supported SMBIOS spec up to v3.3.0

no initial comment

Thanks for this PR!

This patch removes %{?_smp_mflags}. Will set_build_flags automatically setup the number of processors for parallel building? Btw, I couldn't find any documentation that explain set_build_flags in detail? Could you point me to a link since I'm new to RPM?

Hm, I thought %make_install would use %smp_mflags as well, but now that I double-checked, it, it seems it doesn't. Not sure if that makes a difference for the install of this package but I can add it back of course.

And i could've sworn that I've read documentation saying if you don't use %configure or similar for other build systems, you should use set_build_flags in combination with %make_build but now I can't find it. %set_build_flags is what %configure does: https://github.com/rpm-software-management/rpm/blob/master/macros.in#L977-L985