|
|
fbf956a |
# FORCE NOARCH
|
|
|
fbf956a |
# This package is noarch intentionally, although it supplies binaries,
|
|
|
fbf956a |
# as they're not intended for the build platform, but for ARM.
|
|
|
fbf956a |
# The related discussion can be found here:
|
|
|
fbf956a |
# https://www.redhat.com/archives/fedora-devel-list/2009-February/msg02261.html
|
|
|
fbf956a |
%global _binaries_in_noarch_packages_terminate_build 0
|
|
|
fbf956a |
|
|
|
fbf956a |
%global target arm-none-eabi
|
|
|
8e47759 |
%global pkg_version 2.5.0
|
|
|
fbf956a |
|
|
|
fbf956a |
Name: %{target}-newlib
|
|
|
8e47759 |
Version: 2.5.0
|
|
|
961628f |
Release: 2%{?dist}
|
|
|
fbf956a |
Summary: C library intended for use on %{target} embedded systems
|
|
|
fbf956a |
Group: Development/Tools
|
|
|
e526ca8 |
# For a breakdown of the licensing, see NEWLIB-LICENSING
|
|
|
fbf956a |
License: BSD and MIT and LGPLv2+ and ISC
|
|
|
fbf956a |
URL: http://sourceware.org/newlib/
|
|
|
e526ca8 |
Source0: ftp://sourceware.org/pub/newlib/newlib-%{pkg_version}.tar.gz
|
|
|
fbf956a |
Source1: README.fedora
|
|
|
fbf956a |
Source2: NEWLIB-LICENSING
|
|
|
2066f30 |
|
|
|
fbf956a |
BuildRequires: %{target}-binutils %{target}-gcc %{target}-gcc-c++ texinfo texinfo-tex
|
|
|
fbf956a |
BuildArch: noarch
|
|
|
fbf956a |
|
|
|
fbf956a |
%description
|
|
|
fbf956a |
Newlib is a C library intended for use on embedded systems. It is a
|
|
|
fbf956a |
conglomeration of several library parts, all under free software licenses
|
|
|
fbf956a |
that make them easily usable on embedded products.
|
|
|
fbf956a |
|
|
|
fbf956a |
%prep
|
|
|
e526ca8 |
%setup -q -n newlib-%{pkg_version}
|
|
|
fbf956a |
|
|
|
fbf956a |
|
|
|
fbf956a |
%build
|
|
|
e526ca8 |
rm -rf build-{newlib,nano}
|
|
|
e526ca8 |
mkdir build-{newlib,nano}
|
|
|
e526ca8 |
|
|
|
e526ca8 |
pushd build-newlib
|
|
|
e526ca8 |
|
|
|
961628f |
export CFLAGS_FOR_TARGET="-g -O2 -ffunction-sections -fdata-sections"
|
|
|
e526ca8 |
../configure \
|
|
|
e526ca8 |
--prefix=%{_prefix} \
|
|
|
e526ca8 |
--libdir=%{_libdir} \
|
|
|
e526ca8 |
--mandir=%{_mandir} \
|
|
|
e526ca8 |
--htmldir=%{_docdir}/html \
|
|
|
e526ca8 |
--pdfdir=%{_docdir}/pdf \
|
|
|
e526ca8 |
--target=%{target} \
|
|
|
fd46a00 |
--enable-newlib-io-long-long \
|
|
|
8e47759 |
--enable-newlib-register-fini \
|
|
|
8e47759 |
--enable-newlib-retargetable-locking \
|
|
|
8e47759 |
--disable-newlib-supplied-syscalls \
|
|
|
e526ca8 |
--disable-nls \
|
|
|
8e47759 |
--enable-multilib \
|
|
|
e526ca8 |
--disable-libssp \
|
|
|
e526ca8 |
--with-float=soft
|
|
|
fbf956a |
|
|
|
d2d3479 |
make
|
|
|
fbf956a |
|
|
|
e526ca8 |
popd
|
|
|
e526ca8 |
pushd build-nano
|
|
|
961628f |
export CFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections"
|
|
|
e526ca8 |
../configure \
|
|
|
e526ca8 |
--prefix=%{_prefix} \
|
|
|
e526ca8 |
--libdir=%{_libdir} \
|
|
|
e526ca8 |
--mandir=%{_mandir} \
|
|
|
e526ca8 |
--target=%{target} \
|
|
|
8e47759 |
--disable-newlib-supplied-syscalls \
|
|
|
8e47759 |
--enable-newlib-reent-small \
|
|
|
8e47759 |
--disable-newlib-fvwrite-in-streamio \
|
|
|
8e47759 |
--disable-newlib-fseek-optimization \
|
|
|
8e47759 |
--disable-newlib-wide-orient \
|
|
|
8e47759 |
--enable-newlib-nano-malloc \
|
|
|
8e47759 |
--disable-newlib-unbuf-stream-opt \
|
|
|
8e47759 |
--enable-lite-exit \
|
|
|
8e47759 |
--enable-newlib-global-atexit \
|
|
|
8e47759 |
--enable-newlib-nano-formatted-io \
|
|
|
8e47759 |
--disable-nls
|
|
|
8e47759 |
|
|
|
8e47759 |
make -j
|
|
|
e526ca8 |
|
|
|
e526ca8 |
popd
|
|
|
e526ca8 |
|
|
|
fbf956a |
%install
|
|
|
e526ca8 |
pushd build-newlib
|
|
|
e526ca8 |
make install DESTDIR=%{buildroot}
|
|
|
e526ca8 |
popd
|
|
|
e526ca8 |
pushd build-nano
|
|
|
e526ca8 |
NANO_ROOT=%{buildroot}/nano
|
|
|
e526ca8 |
make install DESTDIR=$NANO_ROOT
|
|
|
e526ca8 |
|
|
|
e526ca8 |
for i in $(find $NANO_ROOT -regex ".*/lib\(c\|g\|rdimon\)\.a"); do
|
|
|
e526ca8 |
file=$(basename $i | sed "s|\.a|_nano\.a|")
|
|
|
e526ca8 |
target_path=$(dirname $i | sed "s|$NANO_ROOT||")
|
|
|
e526ca8 |
mv $i "%{buildroot}$target_path/$file"
|
|
|
e526ca8 |
done
|
|
|
e526ca8 |
popd
|
|
|
e526ca8 |
|
|
|
e526ca8 |
cp %{SOURCE1} .
|
|
|
e526ca8 |
cp %{SOURCE2} .
|
|
|
e526ca8 |
|
|
|
fbf956a |
# we don't want these as we are a cross version
|
|
|
fffaca0 |
rm -rf %{buildroot}%{_infodir}
|
|
|
fbf956a |
|
|
|
e526ca8 |
rm -rf $NANO_ROOT
|
|
|
fbf956a |
# despite us being noarch redhat-rpm-config insists on stripping our files
|
|
|
e2c8325 |
%if %{fedora}0 > 200
|
|
|
e2c8325 |
%global __os_install_post /usr/lib/rpm/brp-compress
|
|
|
e2c8325 |
%else
|
|
|
fbf956a |
%global __os_install_post /usr/lib/rpm/redhat/brp-compress
|
|
|
e2c8325 |
%endif
|
|
|
e2c8325 |
|
|
|
fbf956a |
|
|
|
fbf956a |
%files
|
|
|
fbf956a |
%defattr(-,root,root,-)
|
|
|
e526ca8 |
%doc README.fedora
|
|
|
e526ca8 |
%license NEWLIB-LICENSING COPYING*
|
|
|
fbf956a |
%dir %{_prefix}/%{target}
|
|
|
e526ca8 |
%dir %{_prefix}/%{target}/include/
|
|
|
e526ca8 |
%{_prefix}/%{target}/include/*
|
|
|
fbf956a |
%dir %{_prefix}/%{target}/lib
|
|
|
fbf956a |
%{_prefix}/%{target}/lib/*
|
|
|
fbf956a |
|
|
|
fbf956a |
%changelog
|
|
|
961628f |
* Mon Jul 10 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.5.0-2
|
|
|
961628f |
- make sure -Os flags are used for nano version (#1443512)
|
|
|
961628f |
|
|
|
8e47759 |
* Fri Jun 23 2017 Michal Hlavinka <mhlavink@redhat.com> - 2.5.0-1
|
|
|
8e47759 |
- updated to 2.5.0
|
|
|
8e47759 |
|
|
|
9b4e8a9 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-9
|
|
|
9b4e8a9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
9b4e8a9 |
|
|
|
b2ddc64 |
* Sun Nov 13 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.4.0-8
|
|
|
b2ddc64 |
- bump release and rebuild
|
|
|
b2ddc64 |
|
|
|
a34580b |
* Thu Jun 30 2016 Michal Hlavinka <mhlavink@redhat.com> - 2.4.0-7
|
|
|
a34580b |
- updated to 2.4.0
|
|
|
a34580b |
|
|
|
cc0f377 |
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.2.0_1-7
|
|
|
cc0f377 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
cc0f377 |
|
|
|
ebbed61 |
* Wed Sep 02 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.2.0_1-6
|
|
|
ebbed61 |
- bump release and rebuild
|
|
|
ebbed61 |
|
|
|
fd46a00 |
* Wed Sep 02 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.2.0_1-5
|
|
|
fd46a00 |
- add --enable-newlib-io-long-long configure option
|
|
|
fd46a00 |
|
|
|
e526ca8 |
* Mon Aug 31 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.2.0_1-4
|
|
|
e526ca8 |
- added nano versions of libraries
|
|
|
e526ca8 |
- cleaned up spec file
|
|
|
e526ca8 |
- credits: Johnny Robeson
|
|
|
e526ca8 |
|
|
|
ca51e53 |
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.2.0_1-3
|
|
|
ca51e53 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
ca51e53 |
|
|
|
f31c0e5 |
* Mon Jun 01 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.2.0_1-2
|
|
|
f31c0e5 |
- rebuild for gcc 5.1
|
|
|
f31c0e5 |
|
|
|
d2d3479 |
* Tue Apr 14 2015 Michal Hlavinka <mhlavink@redhat.com> - 2.2.0_1-1
|
|
|
d2d3479 |
- newlib updated to 2.2.0_1
|
|
|
d2d3479 |
|
|
|
e2c8325 |
* Mon Jun 09 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.1.0-5
|
|
|
e2c8325 |
- fix FTBFS (#1105970)
|
|
|
e2c8325 |
|
|
|
5fdcd91 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.1.0-4
|
|
|
5fdcd91 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
5fdcd91 |
|
|
|
2066f30 |
* Tue Feb 25 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.1.0-3
|
|
|
2066f30 |
- enable libnosys (#1060567,#1058722)
|
|
|
2066f30 |
|
|
|
a9f158a |
* Tue Jan 14 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.1.0-2
|
|
|
a9f158a |
- rebuild with newer arm-none-eabi-gcc
|
|
|
a9f158a |
|
|
|
fbf956a |
* Wed Jan 08 2014 Michal Hlavinka <mhlavink@redhat.com> - 2.1.0-1
|
|
|
fbf956a |
- initial import
|