From b04ead8bfb25d7ea22f07342c41312c623479c0b Mon Sep 17 00:00:00 2001 From: Petr Lautrbach Date: Mon, 11 Mar 2019 10:56:01 +0100 Subject: [PATCH] Use build flags set by %set_build_flags --- libselinux.spec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libselinux.spec b/libselinux.spec index a0c81b7..a0363ae 100644 --- a/libselinux.spec +++ b/libselinux.spec @@ -101,10 +101,11 @@ needed for developing SELinux applications. %autosetup -p 1 -n libselinux-%{version}-rc2 %build -export LDFLAGS="%{?__global_ldflags}" export DISABLE_RPM="y" export USE_PCRE2="y" +%set_build_flags + # To support building the Python wrapper against multiple Python runtimes # Define a function, for how to perform a "build" of the python wrapper against # a specific runtime: @@ -114,18 +115,18 @@ BuildPythonWrapper() { # Perform the build from the upstream Makefile: make \ PYTHON=$BinaryName \ - LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \ + LIBDIR="%{_libdir}" %{?_smp_mflags} \ pywrap } make clean -make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} swigify -make LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} all +make LIBDIR="%{_libdir}" %{?_smp_mflags} swigify +make LIBDIR="%{_libdir}" %{?_smp_mflags} all BuildPythonWrapper %{__python2} BuildPythonWrapper %{__python3} -make RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" CFLAGS="-g %{optflags}" %{?_smp_mflags} rubywrap +make RUBYINC="%{ruby_inc}" SHLIBDIR="%{_libdir}" LIBDIR="%{_libdir}" LIBSEPOLA="%{_libdir}/libsepol.a" %{?_smp_mflags} rubywrap %install InstallPythonWrapper() { @@ -133,7 +134,7 @@ InstallPythonWrapper() { make \ PYTHON=$BinaryName \ - LIBDIR="%{_libdir}" CFLAGS="-g %{optflags}" %{?_smp_mflags} \ + LIBDIR="%{_libdir}" %{?_smp_mflags} \ LIBSEPOLA="%{_libdir}/libsepol.a" \ pywrap