81 lines
2.0 KiB
RPMSpec
81 lines
2.0 KiB
RPMSpec
%global debug_package %{nil}
|
|
%global _newlib newlib
|
|
Name: newlib
|
|
Version: 3.3.0
|
|
Release: 5
|
|
Summary: Newlib is a C library intended for use on embedded systems.
|
|
|
|
License: BSD
|
|
URL: https://sourceware.org/newlib/
|
|
Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz
|
|
|
|
Patch01: Modify-neon-instruction.patch
|
|
Patch02: fix-CVE-2024-30949.patch
|
|
BuildRequires: make gcc binutils texinfo texinfo-tex
|
|
|
|
Excludearch: loongarch64
|
|
|
|
%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.
|
|
|
|
|
|
%prep
|
|
%autosetup -p1
|
|
|
|
|
|
%build
|
|
rm -rf build-newlib
|
|
mkdir build-newlib
|
|
cd build-newlib
|
|
|
|
%if "%toolchain" == "clang"
|
|
export CFLAGS="-O2 -D_FORTIFY_SOURCE=0 -ffreestanding"
|
|
%else
|
|
export CFLAGS="-O2 -D_FORTIFY_SOURCE=0"
|
|
%endif
|
|
|
|
../newlib/configure --prefix=%{_prefix}
|
|
make %{?_smp_mflags}
|
|
cd ..
|
|
|
|
|
|
%install
|
|
rm -rf %{buildroot}
|
|
cd build-newlib
|
|
make DESTDIR=%{buildroot}%{_prefix}/%{_newlib} install install-info
|
|
cd ..
|
|
|
|
|
|
%files
|
|
%license COPYING*
|
|
%{_prefix}/%{_newlib}%{_prefix}/include/*.h
|
|
%{_prefix}/%{_newlib}%{_prefix}/include/sys/*.h
|
|
%{_prefix}/%{_newlib}%{_prefix}/include/ssp/*.h
|
|
%{_prefix}/%{_newlib}%{_prefix}/include/machine/*.h
|
|
%{_prefix}/%{_newlib}%{_prefix}/lib/lib{c,m,g}.a
|
|
%doc
|
|
%{_prefix}/%{_newlib}%{_prefix}/share/info/dir
|
|
%{_prefix}/%{_newlib}%{_prefix}/share/info/libc.info
|
|
%{_prefix}/%{_newlib}%{_prefix}/share/info/libc.info-{1,2}
|
|
%{_prefix}/%{_newlib}%{_prefix}/share/info/libm.info
|
|
|
|
|
|
%changelog
|
|
* Wed Sep 25 2024 changtao <changtao@kylinos.cn> - 3.3.0-5
|
|
- fix CVE-2024-30949
|
|
|
|
* Sat Jun 08 2024 yueyuankun <yueyuankun@kylinos.cn> - 3.3.0-4
|
|
- add Excludearch: loongarch64
|
|
|
|
* Wed Sep 6 2023 renyi <977713017@qq.com> - 3.3.0-3
|
|
- Support building this package with clang
|
|
|
|
* Wed Dec 15 2021 jiangxinyu <jiangxinyu@kylinos.cn> - 3.3.0-2
|
|
- Remove the release suffix
|
|
|
|
* Sat Sep 25 2021 Lijinpei <lijinpei@huawei.com>
|
|
- Package init
|