SHA256
1
0
forked from pool/binutils

Accepting request 975772 from home:Andreas_Schwab:Factory

- Enable multitarget build on rinscv64
- On SLE15 and later, use make -Oline to synchronize configure output by
  lines

OBS-URL: https://build.opensuse.org/request/show/975772
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/binutils?expand=0&rev=408
This commit is contained in:
Michael Matz 2022-05-09 12:46:21 +00:00 committed by Git OBS Bridge
parent 990fc24d26
commit 22b4e7d19c
2 changed files with 18 additions and 6 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon May 9 10:18:29 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Enable multitarget build on rinscv64
- On SLE15 and later, use make -Oline to synchronize configure output by
lines
------------------------------------------------------------------- -------------------------------------------------------------------
Wed May 4 12:08:27 UTC 2022 - Martin Liška <mliska@suse.cz> Wed May 4 12:08:27 UTC 2022 - Martin Liška <mliska@suse.cz>

View File

@ -94,7 +94,7 @@ Release: 0
%define make_check_handling false %define make_check_handling false
%endif %endif
# handle all binary object formats supported by SUSE (and a few more) # handle all binary object formats supported by SUSE (and a few more)
%ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le s390 s390x x86_64 %ifarch %ix86 %arm aarch64 ia64 ppc ppc64 ppc64le riscv64 s390 s390x x86_64
%define build_multitarget 1 %define build_multitarget 1
%else %else
%define build_multitarget 0 %define build_multitarget 0
@ -211,6 +211,11 @@ The Compact C Type Format (CTF) is a way of representing information about a bin
%endif %endif
%define DIST %(echo '%distribution' | sed 's/ (.*)//') %define DIST %(echo '%distribution' | sed 's/ (.*)//')
%if 0%{suse_version} >= 1500
# Synchronize output by lines, useful for configure output
%define make_output_sync -Oline
%endif
%prep %prep
echo "make check will return with %{make_check_handling} in case of testsuite failures." echo "make check will return with %{make_check_handling} in case of testsuite failures."
%setup -q -n binutils-%{version} %setup -q -n binutils-%{version}
@ -348,14 +353,14 @@ cd build-dir
# we patch headers (bfd-in.h) that are input to other headers # we patch headers (bfd-in.h) that are input to other headers
# which are generated only with --enable-maintainer-mode (which we # which are generated only with --enable-maintainer-mode (which we
# don't do) or explicitely by make headers, so do this: # don't do) or explicitely by make headers, so do this:
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1 make %{?make_output_sync} %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
# the above interacts with --enable-pgo-build=lto because all-bfd doesn't # the above interacts with --enable-pgo-build=lto because all-bfd doesn't
# have the PGO handling, hence it's config.cache files are wrong # have the PGO handling, hence it's config.cache files are wrong
# remove all of those for reconfigure # remove all of those for reconfigure
rm */config.cache rm */config.cache
# force reconfiguring # force reconfiguring
rm bfd/Makefile rm bfd/Makefile
make %{?_smp_mflags} V=1 make %{?make_output_sync} %{?_smp_mflags} V=1
%else %else
# building cross-TARGET-binutils # building cross-TARGET-binutils
@ -421,17 +426,17 @@ EXTRA_TARGETS="$EXTRA_TARGETS,aarch64-suse-linux"
--enable-default-hash-style=both \ --enable-default-hash-style=both \
%endif %endif
${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"} ${EXTRA_TARGETS:+--enable-targets="${EXTRA_TARGETS#,}"}
make %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1 make %{?make_output_sync} %{?_smp_mflags} all-bfd TARGET-bfd=headers V=1
rm */config.cache rm */config.cache
# force reconfiguring # force reconfiguring
rm bfd/Makefile rm bfd/Makefile
make %{?_smp_mflags} V=1 make %{?make_output_sync} %{?_smp_mflags} V=1
%if "%{TARGET}" == "avr" %if "%{TARGET}" == "avr"
# build an extra nesC version because nesC requires $'s in identifiers # build an extra nesC version because nesC requires $'s in identifiers
cp -a gas gas-nesc cp -a gas gas-nesc
echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h echo '#include "tc-%{TARGET}-nesc.h"' > gas-nesc/targ-cpu.h
make -C gas-nesc clean make -C gas-nesc clean
make -C gas-nesc %{?_smp_mflags} make -C gas-nesc %{?make_output_sync} %{?_smp_mflags}
%endif %endif
%endif %endif