Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package newlib for openSUSE:Factory checked in at 2021-12-23 17:53:42 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/newlib (Old) and /work/SRC/openSUSE:Factory/.newlib.new.2520 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "newlib" Thu Dec 23 17:53:42 2021 rev:12 rq:942155 version:4.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/newlib/newlib.changes 2021-07-16 00:03:05.048416504 +0200 +++ /work/SRC/openSUSE:Factory/.newlib.new.2520/newlib.changes 2021-12-23 17:53:57.227726715 +0100 @@ -1,0 +2,8 @@ +Sun Dec 19 17:14:21 UTC 2021 - Stefan Br??ns <stefan.bru...@rwth-aachen.de> + +- Build also nano variants of the libraries. The flags/features + are the same as used e.g. by ARM for their toolchain, or + fedora; most notably syscalls are not supplied, as this targets + bare metal. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ newlib.spec ++++++ --- /var/tmp/diff_new_pack.mRemjq/_old 2021-12-23 17:53:57.703727011 +0100 +++ /var/tmp/diff_new_pack.mRemjq/_new 2021-12-23 17:53:57.707727013 +0100 @@ -1,5 +1,5 @@ # -# spec file +# spec file for package newlib # # Copyright (c) 2021 SUSE LLC # @@ -73,22 +73,33 @@ %build %if "%{flavor}" != "" -mkdir build-dir -cd build-dir -# On %%ix86 hosts newlib is documented to be buildable as shared library via --with-newlib, -# but it fails to build for us and we don't need a host library at the moment. -../configure \ +for variant in nano regular; do + mkdir build-${variant}-dir + pushd build-${variant}-dir + # On %%ix86 hosts newlib is documented to be buildable as shared library via --with-newlib, + # but it fails to build for us and we don't need a host library at the moment. + export CFLAGS_FOR_TARGET="-O2 -g -ffunction-sections -fdata-sections" + FEATURES="--disable-nls" + if [[ "${variant}" == "nano" ]]; then + export CFLAGS_FOR_TARGET="-Os -g" + FEATURES="${FEATURES} --enable-newlib-nano-malloc --enable-lite-exit --enable-newlib-nano-formatted-io --disable-newlib-supplied-syscalls" + fi + ../configure \ --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \ --target=%{target} \ - --with-build-sysroot=%{sysroot} + --with-build-sysroot=%{sysroot} \ + $FEATURES \ %ifarch %{ix86} %if 0 --with-newlib \ %endif %endif - CFLAGS="%{optflags}" + CFLAGS="%{optflags}" \ + %{nil} -%make_build + %make_build + popd +done %endif %install @@ -101,8 +112,26 @@ : >debugsourcefiles.list : >debugsources.list -cd build-dir -%make_install +for variant in nano regular; do + pushd build-${variant}-dir + if [[ "${variant}" == "regular" ]]; then + %make_install + else + %make_install DESTDIR=/tmp/newlib-nano + multilibs=$(%{target}-gcc --print-multi-lib) + for multilib in ${multilibs}; do + multilib="${multilib%%;*}" + for l in libc libg librdimon libstdc++ libsupc++; do + test -f /tmp/newlib-nano/%{_prefix}/%{target}/lib/${multilib}/${l}.a || continue + install -m 0644 -D /tmp/newlib-nano/%{_prefix}/%{target}/lib/${multilib}/${l}.a \ + %{buildroot}%{_prefix}/%{target}/lib/${multilib}/${l}_nano.a + done + done + install -m 0644 -D -t %{buildroot}%{_prefix}/%{target}/include/newlib-nano/ /tmp/newlib-nano/%{_prefix}/%{target}/include/newlib.h + fi + popd +done + %fdupes %{buildroot} %endif