From fbbc11bf25502b9ea70540e2cd3ce7a0f337b801a606274c38c9637df42d4ade Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Mon, 22 Aug 2016 11:16:11 +0000 Subject: [PATCH] Accepting request 418986 from Base:System Please merge with GCC6 sumbission, for build results look in deve:gcc - Add rx and epiphany targets - Add rx and epiphany targets - Drop newlib-rpmlintrc - Apply epiphany-fixes.diff not only to cross builds (.spec.in) but also in newlib.spec, to please factory-auto checker (sr#395228) - Prepare rl78 target - Update to 2.4.0 * Info files are no longer built * Package all license and read-me files - Clean up makeinfo dependency - Drop cross .spec files in preparation for Factory submission - Update to 2.2.0.20150623 - Add cross-rx-newlib-devel package - Revert installing files to sysroot - Switch cross template to gcc5 - Install target files to sysroot - Enable native builds - epiphany-fixes.diff: Drop executable permissions of libepiphany.a and crt0.o OBS-URL: https://build.opensuse.org/request/show/418986 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/newlib?expand=0&rev=2 --- cross-epiphany-newlib-devel.changes | 71 ++++++++++++++++++++++++ cross-epiphany-newlib-devel.spec | 85 +++++++++++++++++++++++++++++ cross-rx-newlib-devel.changes | 71 ++++++++++++++++++++++++ cross-rx-newlib-devel.spec | 85 +++++++++++++++++++++++++++++ newlib.changes | 5 ++ newlib.spec.in | 8 +-- pre_checkin.sh | 8 +-- 7 files changed, 323 insertions(+), 10 deletions(-) create mode 100644 cross-epiphany-newlib-devel.changes create mode 100644 cross-epiphany-newlib-devel.spec create mode 100644 cross-rx-newlib-devel.changes create mode 100644 cross-rx-newlib-devel.spec diff --git a/cross-epiphany-newlib-devel.changes b/cross-epiphany-newlib-devel.changes new file mode 100644 index 0000000..f8f35fd --- /dev/null +++ b/cross-epiphany-newlib-devel.changes @@ -0,0 +1,71 @@ +------------------------------------------------------------------- +Fri Jul 1 12:32:49 UTC 2016 - rguenther@suse.com + +- Add rx and epiphany targets + +------------------------------------------------------------------- +Tue May 17 17:55:35 UTC 2016 - afaerber@suse.de + +- Drop newlib-rpmlintrc + +------------------------------------------------------------------- +Sat May 14 00:18:57 UTC 2016 - afaerber@suse.de + +- Apply epiphany-fixes.diff not only to cross builds (.spec.in) but + also in newlib.spec, to please factory-auto checker (sr#395228) + +------------------------------------------------------------------- +Fri May 13 16:57:05 UTC 2016 - afaerber@suse.de + +- Prepare rl78 target +- Update to 2.4.0 +* Info files are no longer built +* Package all license and read-me files +- Clean up makeinfo dependency +- Drop cross .spec files in preparation for Factory submission + +------------------------------------------------------------------- +Mon Jul 20 21:52:07 UTC 2015 - afaerber@suse.de + +- Update to 2.2.0.20150623 +- Add cross-rx-newlib-devel package +- Revert installing files to sysroot + +------------------------------------------------------------------- +Fri Jul 10 21:50:42 UTC 2015 - afaerber@suse.de + +- Switch cross template to gcc5 + +------------------------------------------------------------------- +Mon Apr 6 15:53:44 UTC 2015 - afaerber@suse.de + +- Install target files to sysroot + +------------------------------------------------------------------- +Sat Nov 1 00:52:40 UTC 2014 - afaerber@suse.de + +- Enable native builds + +------------------------------------------------------------------- +Fri Oct 31 21:08:45 UTC 2014 - afaerber@suse.de + +- epiphany-fixes.diff: Drop executable permissions of + libepiphany.a and crt0.o + +------------------------------------------------------------------- +Fri Oct 31 20:05:26 UTC 2014 - afaerber@suse.de + +- Turn cross-epiphany-newlib into generic newlib package +* Rename packages to -devel to avoid empty -newlib packages + +------------------------------------------------------------------- +Tue Oct 21 07:21:21 UTC 2014 - afaerber@suse.de + +- Update to official 2.1.0 tarball +* Drop portability.patch + +------------------------------------------------------------------- +Tue Sep 30 02:29:16 UTC 2014 - afaerber@suse.de + +- Initial + diff --git a/cross-epiphany-newlib-devel.spec b/cross-epiphany-newlib-devel.spec new file mode 100644 index 0000000..1f76a90 --- /dev/null +++ b/cross-epiphany-newlib-devel.spec @@ -0,0 +1,85 @@ +# +# spec file for package cross-epiphany-newlib-devel +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define cross_arch epiphany + +Name: cross-%{cross_arch}-newlib-devel +Version: 2.4.0 +Release: 0 +Summary: C library intended for use on %{cross_arch} embedded systems +License: BSD-3-Clause and MIT and LGPL-2.0+ and ISC +Group: Development/Tools +Url: https://sourceware.org/newlib/ +Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz + +Patch1: epiphany-fixes.diff + +BuildRequires: cross-%{cross_arch}-binutils +BuildRequires: cross-%{cross_arch}-gcc%{gcc_version}-bootstrap +%if %{suse_version} > 1220 +BuildRequires: makeinfo +%else +BuildRequires: texinfo +%endif + +%description +Newlib is a C library intended for use on embedded systems. It is a +conglomeration of several library parts, all under free software licenses +that make them easily usable on embedded products. + +%define target %{cross_arch} +%if %{cross_arch} == "epiphany" || %{cross_arch} == "rl78" || %{cross_arch} == "rx" +%define target %{cross_arch}-elf +%endif +%if %{cross_arch} == "spu" +%define sysroot /usr/spu +%else +%define sysroot %{_prefix}/%{target}/sys-root +%endif + +%prep +%setup -q -n newlib-%{version} +%patch1 -p1 + +%build +mkdir build-dir +cd build-dir +../configure \ + --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \ + --target=%{target} --with-build-sysroot=%{sysroot} \ + CC_FOR_TARGET=%{target}-gcc-%{gcc_version} \ + CXX_FOR_TARGET=%{target}-g++-%{gcc_version} \ + GCC_FOR_TARGET=%{target}-gcc-%{gcc_version} +make %{?_smp_mflags} + +%install +# All binaries built are for the target architecture - don't damage them. +export NO_BRP_STRIP_DEBUG=true +export NO_DEBUGINFO_STRIP_DEBUG=true +%define __debug_install_post %{nil} +: >debugfiles.list +: >debugsources.list + +cd build-dir +make install DESTDIR=%{buildroot} + +%files +%defattr(-,root,root,-) +%{_prefix}/%{target}/ + +%changelog diff --git a/cross-rx-newlib-devel.changes b/cross-rx-newlib-devel.changes new file mode 100644 index 0000000..f8f35fd --- /dev/null +++ b/cross-rx-newlib-devel.changes @@ -0,0 +1,71 @@ +------------------------------------------------------------------- +Fri Jul 1 12:32:49 UTC 2016 - rguenther@suse.com + +- Add rx and epiphany targets + +------------------------------------------------------------------- +Tue May 17 17:55:35 UTC 2016 - afaerber@suse.de + +- Drop newlib-rpmlintrc + +------------------------------------------------------------------- +Sat May 14 00:18:57 UTC 2016 - afaerber@suse.de + +- Apply epiphany-fixes.diff not only to cross builds (.spec.in) but + also in newlib.spec, to please factory-auto checker (sr#395228) + +------------------------------------------------------------------- +Fri May 13 16:57:05 UTC 2016 - afaerber@suse.de + +- Prepare rl78 target +- Update to 2.4.0 +* Info files are no longer built +* Package all license and read-me files +- Clean up makeinfo dependency +- Drop cross .spec files in preparation for Factory submission + +------------------------------------------------------------------- +Mon Jul 20 21:52:07 UTC 2015 - afaerber@suse.de + +- Update to 2.2.0.20150623 +- Add cross-rx-newlib-devel package +- Revert installing files to sysroot + +------------------------------------------------------------------- +Fri Jul 10 21:50:42 UTC 2015 - afaerber@suse.de + +- Switch cross template to gcc5 + +------------------------------------------------------------------- +Mon Apr 6 15:53:44 UTC 2015 - afaerber@suse.de + +- Install target files to sysroot + +------------------------------------------------------------------- +Sat Nov 1 00:52:40 UTC 2014 - afaerber@suse.de + +- Enable native builds + +------------------------------------------------------------------- +Fri Oct 31 21:08:45 UTC 2014 - afaerber@suse.de + +- epiphany-fixes.diff: Drop executable permissions of + libepiphany.a and crt0.o + +------------------------------------------------------------------- +Fri Oct 31 20:05:26 UTC 2014 - afaerber@suse.de + +- Turn cross-epiphany-newlib into generic newlib package +* Rename packages to -devel to avoid empty -newlib packages + +------------------------------------------------------------------- +Tue Oct 21 07:21:21 UTC 2014 - afaerber@suse.de + +- Update to official 2.1.0 tarball +* Drop portability.patch + +------------------------------------------------------------------- +Tue Sep 30 02:29:16 UTC 2014 - afaerber@suse.de + +- Initial + diff --git a/cross-rx-newlib-devel.spec b/cross-rx-newlib-devel.spec new file mode 100644 index 0000000..858922f --- /dev/null +++ b/cross-rx-newlib-devel.spec @@ -0,0 +1,85 @@ +# +# spec file for package cross-rx-newlib-devel +# +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%define cross_arch rx + +Name: cross-%{cross_arch}-newlib-devel +Version: 2.4.0 +Release: 0 +Summary: C library intended for use on %{cross_arch} embedded systems +License: BSD-3-Clause and MIT and LGPL-2.0+ and ISC +Group: Development/Tools +Url: https://sourceware.org/newlib/ +Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz + +Patch1: epiphany-fixes.diff + +BuildRequires: cross-%{cross_arch}-binutils +BuildRequires: cross-%{cross_arch}-gcc%{gcc_version}-bootstrap +%if %{suse_version} > 1220 +BuildRequires: makeinfo +%else +BuildRequires: texinfo +%endif + +%description +Newlib is a C library intended for use on embedded systems. It is a +conglomeration of several library parts, all under free software licenses +that make them easily usable on embedded products. + +%define target %{cross_arch} +%if %{cross_arch} == "epiphany" || %{cross_arch} == "rl78" || %{cross_arch} == "rx" +%define target %{cross_arch}-elf +%endif +%if %{cross_arch} == "spu" +%define sysroot /usr/spu +%else +%define sysroot %{_prefix}/%{target}/sys-root +%endif + +%prep +%setup -q -n newlib-%{version} +%patch1 -p1 + +%build +mkdir build-dir +cd build-dir +../configure \ + --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \ + --target=%{target} --with-build-sysroot=%{sysroot} \ + CC_FOR_TARGET=%{target}-gcc-%{gcc_version} \ + CXX_FOR_TARGET=%{target}-g++-%{gcc_version} \ + GCC_FOR_TARGET=%{target}-gcc-%{gcc_version} +make %{?_smp_mflags} + +%install +# All binaries built are for the target architecture - don't damage them. +export NO_BRP_STRIP_DEBUG=true +export NO_DEBUGINFO_STRIP_DEBUG=true +%define __debug_install_post %{nil} +: >debugfiles.list +: >debugsources.list + +cd build-dir +make install DESTDIR=%{buildroot} + +%files +%defattr(-,root,root,-) +%{_prefix}/%{target}/ + +%changelog diff --git a/newlib.changes b/newlib.changes index d404c7a..f8f35fd 100644 --- a/newlib.changes +++ b/newlib.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Jul 1 12:32:49 UTC 2016 - rguenther@suse.com + +- Add rx and epiphany targets + ------------------------------------------------------------------- Tue May 17 17:55:35 UTC 2016 - afaerber@suse.de diff --git a/newlib.spec.in b/newlib.spec.in index 99b401b..10e64ac 100644 --- a/newlib.spec.in +++ b/newlib.spec.in @@ -11,7 +11,7 @@ Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz Patch1: epiphany-fixes.diff BuildRequires: cross-%{cross_arch}-binutils -BuildRequires: cross-%{cross_arch}-gcc@gcc_base_ver@-bootstrap +BuildRequires: cross-%{cross_arch}-gcc%{gcc_version}-bootstrap %if %{suse_version} > 1220 BuildRequires: makeinfo %else @@ -43,9 +43,9 @@ cd build-dir ../configure \ --prefix=%{_prefix} --libdir=%{_libdir} --mandir=%{_mandir} --infodir=%{_infodir} \ --target=%{target} --with-build-sysroot=%{sysroot} \ - CC_FOR_TARGET=%{target}-gcc%{gcc_binsuffix} \ - CXX_FOR_TARGET=%{target}-g++%{gcc_binsuffix} \ - GCC_FOR_TARGET=%{target}-gcc%{gcc_binsuffix} + CC_FOR_TARGET=%{target}-gcc-%{gcc_version} \ + CXX_FOR_TARGET=%{target}-g++-%{gcc_version} \ + GCC_FOR_TARGET=%{target}-gcc-%{gcc_version} make %{?_smp_mflags} %install diff --git a/pre_checkin.sh b/pre_checkin.sh index aa66573..2cf53a8 100644 --- a/pre_checkin.sh +++ b/pre_checkin.sh @@ -1,16 +1,12 @@ #!/bin/bash -gcc_base_ver=5 -gcc_binsuffix=-5 - rm -f cross*.spec cross*.changes -for arch in ; do +for arch in epiphany rx; do pkgname=cross-$arch-newlib-devel outfile=$pkgname.spec echo "%define cross_arch $arch" > $outfile - echo "%define gcc_binsuffix ${gcc_binsuffix}" >> $outfile - sed -e "s#@gcc_base_ver@#$gcc_base_ver#" newlib.spec.in >> $outfile + cat newlib.spec.in >> $outfile cp newlib.changes $pkgname.changes done