spec: Open code %set_build_flags

There should be no functional difference here, but it's not
obvious at a glance how qemu handles globally defined CFLAGS + LDFLAGS
with --extra-cflags and --extra-ldflags.

Reproduce the desired behavior with explicit configure options and
RPM variables

Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
Cole Robinson 2021-07-23 14:33:57 -04:00
parent e3c05f4d3e
commit b7cbd7e5e1
1 changed files with 3 additions and 5 deletions

View File

@ -1275,11 +1275,9 @@ mkdir -p %{static_builddir}
--with-git-submodules=ignore \\\
--without-default-devices
# Export CFLAGS, LDFLAGS, CC, CXX, etc.
%set_build_flags
run_configure() {
../configure \
--cc=%{__cc} \
--cxx=/bin/false \
--prefix="%{_prefix}" \
--libdir="%{_libdir}" \
@ -1289,8 +1287,8 @@ run_configure() {
--localstatedir="%{_localstatedir}" \
--docdir="%{_docdir}" \
--libexecdir="%{_libexecdir}" \
--extra-ldflags="$LDFLAGS" \
--extra-cflags="$CFLAGS" \
--extra-ldflags="%{build_ldflags}" \
--extra-cflags="%{optflags}" \
--with-pkgversion="%{name}-%{version}-%{release}" \
--with-suffix="%{name}" \
--firmwarepath=%firmwaredirs \