#16 Spec file cleanups
Merged 5 months ago by nickc. Opened 5 months ago by tbaeder.
rpms/ tbaeder/binutils rawhide  into  rawhide

file modified
+10 -14
@@ -466,11 +466,10 @@ 

  

  %build

  echo target is %{binutils_target}

+ %set_build_flags

  

  %ifarch %{power64}

- export CFLAGS="$RPM_OPT_FLAGS -Wno-error"

- %else

- export CFLAGS="$RPM_OPT_FLAGS"

+ export CFLAGS="$CFLAGS -Wno-error"

  %endif

  

  CARGS=
@@ -524,9 +523,6 @@ 

  %define enable_shared 0

  %endif

  

- # BZ 1541027 - include the linker flags from redhat-rpm-config as well.

- export LDFLAGS=$RPM_LD_FLAGS

- 

  %if %{with clang}

  %define _with_cc_clang 1

  %endif
@@ -599,10 +595,10 @@ 

    || cat config.log

  

  %if %{with docs}

- %make_build %{_smp_mflags} tooldir=%{_prefix} all

- %make_build %{_smp_mflags} tooldir=%{_prefix} info

+ %make_build tooldir=%{_prefix} all

+ %make_build tooldir=%{_prefix} info

  %else

- %make_build %{_smp_mflags} tooldir=%{_prefix} MAKEINFO=true all

+ %make_build tooldir=%{_prefix} MAKEINFO=true all

  %endif

  

  # Do not use %%check as it is run after %%install where libbfd.so is rebuilt
@@ -642,9 +638,9 @@ 

  

  %install

  %if %{with docs}

- %make_install DESTDIR=%{buildroot}

+ %make_install

  %else

- %make_install DESTDIR=%{buildroot} MAKEINFO=true

+ %make_install MAKEINFO=true

  %endif

  

  %if %{isnative}
@@ -656,19 +652,19 @@ 

  # Future: Remove it together with its header file, projects should bundle it.

  %make_build -C libiberty clean

  %set_build_flags

- %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C libiberty

+ %make_build CFLAGS="-g -fPIC $CFLAGS" -C libiberty

  

  # Rebuild libbfd.a with -fPIC.

  # Without the hidden visibility the 3rd party shared libraries would export

  # the bfd non-stable ABI.

  %make_build -C bfd clean

  %set_build_flags

- %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS -fvisibility=hidden" -C bfd

+ %make_build CFLAGS="-g -fPIC $CFLAGS -fvisibility=hidden" -C bfd

  

  # Rebuild libopcodes.a with -fPIC.

  %make_build -C opcodes clean

  %set_build_flags

- %make_build CFLAGS="-g -fPIC $RPM_OPT_FLAGS" -C opcodes

+ %make_build CFLAGS="-g -fPIC $CFLAGS" -C opcodes

  

  install -m 644 bfd/libbfd.a %{buildroot}%{_libdir}

  install -m 644 libiberty/libiberty.a %{buildroot}%{_libdir}

no initial comment

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci

Pull-Request has been merged by nickc

5 months ago
Metadata