2016-05-29 03:11:02 +02:00
|
|
|
|
2018-05-14 09:39:22 +02:00
|
|
|
%define gcc_cross_arch %{cross_arch}
|
|
|
|
%if "%{cross_arch}" == "riscv64"
|
|
|
|
%define gcc_cross_arch %{cross_arch}-elf
|
|
|
|
%endif
|
|
|
|
|
2016-05-29 03:11:02 +02:00
|
|
|
Name: cross-%{cross_arch}-newlib-devel
|
2018-03-11 19:37:06 +01:00
|
|
|
Version: 3.0.0
|
2016-05-29 03:11:02 +02:00
|
|
|
Release: 0
|
|
|
|
Summary: C library intended for use on %{cross_arch} embedded systems
|
|
|
|
Group: Development/Tools
|
2018-05-12 22:34:30 +02:00
|
|
|
License: BSD-3-Clause AND MIT AND LGPL-2.0-or-later AND ISC
|
|
|
|
Url: https://sourceware.org/newlib/
|
2016-05-29 03:11:02 +02:00
|
|
|
Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz
|
|
|
|
|
|
|
|
Patch1: epiphany-fixes.diff
|
|
|
|
|
2018-05-14 09:39:22 +02:00
|
|
|
BuildRequires: cross-%{gcc_cross_arch}-gcc%{gcc_version}-bootstrap
|
2016-05-29 03:11:02 +02:00
|
|
|
%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
|
2018-12-25 19:06:23 +01:00
|
|
|
conglomeration of several library parts.
|
2016-05-29 03:11:02 +02:00
|
|
|
|
|
|
|
%define target %{cross_arch}
|
2018-05-14 09:39:22 +02:00
|
|
|
%if "%{cross_arch}" == "epiphany" || "%{cross_arch}" == "riscv32" || "%{cross_arch}" == "riscv64" || "%{cross_arch}" == "rl78" || "%{cross_arch}" == "rx"
|
2016-05-29 03:11:02 +02:00
|
|
|
%define target %{cross_arch}-elf
|
|
|
|
%endif
|
2018-03-12 11:37:51 +01:00
|
|
|
%if "%{cross_arch}" == "arm-none"
|
|
|
|
%define target %{cross_arch}-eabi
|
|
|
|
%endif
|
2018-03-11 18:34:01 +01:00
|
|
|
%if "%{cross_arch}" == "spu"
|
2016-05-29 03:11:02 +02:00
|
|
|
%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} \
|
2018-03-11 18:34:01 +01:00
|
|
|
--target=%{target} \
|
2018-03-12 11:37:51 +01:00
|
|
|
%if "%{cross_arch}" == "arm-none"
|
|
|
|
--with-multilib-list=armv6-m,armv7-m,armv7e-m,cortex-m7,armv7-r \
|
|
|
|
%endif
|
2018-03-11 18:34:01 +01:00
|
|
|
--with-build-sysroot=%{sysroot}
|
2016-05-29 03:11:02 +02:00
|
|
|
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
|
2018-01-24 15:32:25 +01:00
|
|
|
: >debugsourcefiles.list
|
2016-05-29 03:11:02 +02:00
|
|
|
: >debugsources.list
|
|
|
|
|
|
|
|
cd build-dir
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_prefix}/%{target}/
|
|
|
|
|
|
|
|
%changelog
|