Mageia Bugzilla – Attachment 14029 Details for
Bug 32356
arm-none-eabi-newlib is needed to build libreboot from source [PKG REQUEST]
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
Proposal spec
arm-none-eabi-newlib.spec (text/plain), 3.54 KB, created by
Kristoffer Grundström
on 2023-10-03 05:58:04 CEST
(
hide
)
Description:
Proposal spec
Filename:
MIME Type:
Creator:
Kristoffer Grundström
Created:
2023-10-03 05:58:04 CEST
Size:
3.54 KB
patch
obsolete
># FORCE NOARCH ># This package is noarch intentionally, although it supplies binaries, ># as they're not intended for the build platform, but for ARM. ># The related discussion can be found here: ># https://www.redhat.com/archives/fedora-devel-list/2009-February/msg02261.html >%global _binaries_in_noarch_packages_terminate_build 0 > >%global target arm-none-eabi > >Name: %{target}-newlib >Version: 4.3.0.20230120 >Release: 1%{?dist} >Summary: C library intended for use on %{target} embedded systems ># For a breakdown of the licensing, see NEWLIB-LICENSING >License: BSD-2-Clause AND BSD-4-Clause AND LGPL-2.1-or-later AND ISC AND GPL-3.0-or-later AND MIT >URL: http://sourceware.org/newlib/ >Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz >Source1: README.md >Source2: NEWLIB-LICENSING >BuildRequires: gcc >BuildRequires: %{target}-binutils >BuildRequires: %{target}-gcc >BuildRequires: %{target}-gcc-c++ >BuildRequires: texinfo >BuildRequires: texinfo-tex >BuildRequires: make >BuildArch: noarch > >%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 >%setup -q -n newlib-%{version} > >%build >rm -rf build-{newlib,nano} >mkdir build-{newlib,nano} > >pushd build-newlib > >export CFLAGS_FOR_TARGET="-g -O2 -ffunction-sections -fdata-sections" >../configure \ > --prefix=%{_prefix} \ > --libdir=%{_libdir} \ > --mandir=%{_mandir} \ > --htmldir=%{_docdir}/html \ > --pdfdir=%{_docdir}/pdf \ > --target=%{target} \ > --enable-newlib-io-long-long \ > --enable-newlib-register-fini \ > --enable-newlib-retargetable-locking \ > --disable-newlib-supplied-syscalls \ > --disable-nls \ > --enable-multilib \ > --disable-libssp \ > --with-float=soft > >make > >popd >pushd build-nano >export CFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections" >../configure \ > --prefix=%{_prefix} \ > --libdir=%{_libdir} \ > --mandir=%{_mandir} \ > --target=%{target} \ > --disable-newlib-supplied-syscalls \ > --enable-newlib-reent-small \ > --enable-newlib-retargetable-locking \ > --disable-newlib-fvwrite-in-streamio \ > --disable-newlib-fseek-optimization \ > --disable-newlib-wide-orient \ > --enable-newlib-nano-malloc \ > --disable-newlib-unbuf-stream-opt \ > --enable-lite-exit \ > --enable-newlib-global-atexit \ > --enable-newlib-nano-formatted-io \ > --disable-nls > >make -j >popd > >%install >pushd build-newlib >make install DESTDIR=%{buildroot} >popd >pushd build-nano >NANO_ROOT=%{buildroot}/nano >make install DESTDIR=$NANO_ROOT > >for i in $(find $NANO_ROOT -regex ".*/lib\(c\|g\|rdimon\)\.a"); do > file=$(basename $i | sed "s|\.a|_nano\.a|") > target_path=$(dirname $i | sed "s|$NANO_ROOT||") > cp $i "%{buildroot}$target_path/$file" >done >mkdir -p %{buildroot}/usr/arm-none-eabi/include/newlib-nano/ >cp -p $NANO_ROOT/usr/arm-none-eabi/include/newlib.h %{buildroot}/usr/arm-none-eabi/include/newlib-nano/newlib.h >popd > >cp %{SOURCE1} . >cp %{SOURCE2} . > ># we don't want these as we are a cross version >rm -rf %{buildroot}%{_infodir} > >rm -rf $NANO_ROOT ># despite us being noarch redhat-rpm-config insists on stripping our files >%global __os_install_post /usr/lib/rpm/brp-compress > >%files >%doc README.md >%license NEWLIB-LICENSING COPYING* >%dir %{_prefix}/%{target} >%dir %{_prefix}/%{target}/include/ >%{_prefix}/%{target}/include/* >%dir %{_prefix}/%{target}/lib >%{_prefix}/%{target}/lib/*
# FORCE NOARCH # This package is noarch intentionally, although it supplies binaries, # as they're not intended for the build platform, but for ARM. # The related discussion can be found here: # https://www.redhat.com/archives/fedora-devel-list/2009-February/msg02261.html %global _binaries_in_noarch_packages_terminate_build 0 %global target arm-none-eabi Name: %{target}-newlib Version: 4.3.0.20230120 Release: 1%{?dist} Summary: C library intended for use on %{target} embedded systems # For a breakdown of the licensing, see NEWLIB-LICENSING License: BSD-2-Clause AND BSD-4-Clause AND LGPL-2.1-or-later AND ISC AND GPL-3.0-or-later AND MIT URL: http://sourceware.org/newlib/ Source0: ftp://sourceware.org/pub/newlib/newlib-%{version}.tar.gz Source1: README.md Source2: NEWLIB-LICENSING BuildRequires: gcc BuildRequires: %{target}-binutils BuildRequires: %{target}-gcc BuildRequires: %{target}-gcc-c++ BuildRequires: texinfo BuildRequires: texinfo-tex BuildRequires: make BuildArch: noarch %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 %setup -q -n newlib-%{version} %build rm -rf build-{newlib,nano} mkdir build-{newlib,nano} pushd build-newlib export CFLAGS_FOR_TARGET="-g -O2 -ffunction-sections -fdata-sections" ../configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --htmldir=%{_docdir}/html \ --pdfdir=%{_docdir}/pdf \ --target=%{target} \ --enable-newlib-io-long-long \ --enable-newlib-register-fini \ --enable-newlib-retargetable-locking \ --disable-newlib-supplied-syscalls \ --disable-nls \ --enable-multilib \ --disable-libssp \ --with-float=soft make popd pushd build-nano export CFLAGS_FOR_TARGET="-g -Os -ffunction-sections -fdata-sections" ../configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --mandir=%{_mandir} \ --target=%{target} \ --disable-newlib-supplied-syscalls \ --enable-newlib-reent-small \ --enable-newlib-retargetable-locking \ --disable-newlib-fvwrite-in-streamio \ --disable-newlib-fseek-optimization \ --disable-newlib-wide-orient \ --enable-newlib-nano-malloc \ --disable-newlib-unbuf-stream-opt \ --enable-lite-exit \ --enable-newlib-global-atexit \ --enable-newlib-nano-formatted-io \ --disable-nls make -j popd %install pushd build-newlib make install DESTDIR=%{buildroot} popd pushd build-nano NANO_ROOT=%{buildroot}/nano make install DESTDIR=$NANO_ROOT for i in $(find $NANO_ROOT -regex ".*/lib\(c\|g\|rdimon\)\.a"); do file=$(basename $i | sed "s|\.a|_nano\.a|") target_path=$(dirname $i | sed "s|$NANO_ROOT||") cp $i "%{buildroot}$target_path/$file" done mkdir -p %{buildroot}/usr/arm-none-eabi/include/newlib-nano/ cp -p $NANO_ROOT/usr/arm-none-eabi/include/newlib.h %{buildroot}/usr/arm-none-eabi/include/newlib-nano/newlib.h popd cp %{SOURCE1} . cp %{SOURCE2} . # we don't want these as we are a cross version rm -rf %{buildroot}%{_infodir} rm -rf $NANO_ROOT # despite us being noarch redhat-rpm-config insists on stripping our files %global __os_install_post /usr/lib/rpm/brp-compress %files %doc README.md %license NEWLIB-LICENSING COPYING* %dir %{_prefix}/%{target} %dir %{_prefix}/%{target}/include/ %{_prefix}/%{target}/include/* %dir %{_prefix}/%{target}/lib %{_prefix}/%{target}/lib/*
View Attachment As Raw
Actions:
View
Attachments on
bug 32356
: 14029