%define _unpackaged_files_terminate_build 1 %define newlib_version 1.15.0 Summary: SPU C library Name: spu-newlib Version: %{newlib_version} Release: 7 License: GPL Group: Development/Languages Source0: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # All the commented patches need to be delt with # in porting from 1.14.0 to 1.15.0 # # Accelerated stdio, Patch1: newlib-stdio2 Patch2: std_hack.patch # #Fixes bug in faststring.patch Patch3: strxfrm.patch # #accelerated math #Needs a fair amount of work before going to mainline Patch4: add-libm-spu.patch Patch5: add-sdk-headers.patch Patch6: fixup-ilogbf.h Patch7: spu_gen_files_tools Patch8: sdk-c-files.patch Patch9: add-ilogb-defines.patch Patch10: fix-dcvt-test.patch Patch11: newlib-spu-testing-hacks Patch12: base-fenv Patch13: fenv-c-files Patch14: cbrt_factors # Deleted Patch15: fe-round-ltc-27969.patch Patch16: fix-tan-double.patch Patch17: spu_define_ieee_libm.patch # # the vector changes are now only for math functions Patch18: vector-init.diff Patch19: fpscr_packing.patch Patch20: rounding_rfc79.patch Patch21: define_fe_dfl_env Patch22: fix_time.patch Patch23: send_to_ppe Patch24: default_spu_atexit.patch # Submitted upstream. Patch25: sbrk-stack-check.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: texinfo, spu-gcc # Don't strip as the host binutils may be unable to handle SPU objects. %define __os_install_post /usr/lib/rpm/brp-compress # When building the cross-toolchain, reset prefix directory and use sysroot %ifnarch ppc ppc64 %define _prefix /opt/cell %define _mandir %{_prefix}/man %define _infodir %{_prefix}/info %define with_sysroot 1 %else %define with_sysroot 0 %endif %description The spu-newlib package contains the newlib C library version %{newlib_version}. %prep %setup -c -q pushd newlib-%{newlib_version} %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p1 %patch8 -p1 %patch9 -p1 %patch10 -p1 %patch11 -p1 %patch12 -p1 %patch13 -p1 %patch14 -p1 # deleted %patch15 -p1 %patch16 -p1 %patch17 -p1 %patch18 -p1 %patch19 -p1 %patch20 -p1 %patch21 -p1 %patch22 -p1 %patch23 -p1 %patch24 -p1 %patch25 -p1 popd %build %define spu_target_platform spu %define spu_prefix spu- rm -fr obj-%{spu_target_platform} mkdir obj-%{spu_target_platform} cd obj-%{spu_target_platform} OPT_FLAGS=`echo $RPM_OPT_FLAGS|sed -e 's/-fno-rtti//g' -e 's/-fno-exceptions//g'` SPU_OPT_FLAGS="-O2 -g -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" CC="gcc $OPT_FLAGS -DBPA" CC="$CC" CFLAGS="$SPU_OPT_FLAGS" CXXFLAGS="$SPU_OPT_FLAGS" XCFLAGS="$OPT_FLAGS" TCFLAGS="$SPU_OPT_FLAGS" \ ../newlib-%{newlib_version}/configure --prefix=%{_prefix} \ --mandir=%{_mandir} --infodir=%{_infodir} \ %if %{with_sysroot} --with-sysroot=%{_prefix}/sysroot \ %endif --disable-shared --disable-threads --disable-checking --with-headers \ --with-system-zlib \ --disable-multilib --disable-nls \ --enable-version-specific-runtime-libs \ --program-prefix=%{spu_prefix} \ --target=%{spu_target_platform} make %{?_smp_mflags} %install rm -fr $RPM_BUILD_ROOT TARGET_PLATFORM=%{spu_target_platform} make -C obj-%{spu_target_platform} DESTDIR=$RPM_BUILD_ROOT install # Info files conflict with host toolchain files, just remove them for # now. rm -rf $RPM_BUILD_ROOT%{_infodir} %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root) %dir %{_prefix} %dir %{_prefix}/%{spu_target_platform} %dir %{_prefix}/%{spu_target_platform}/include %dir %{_prefix}/%{spu_target_platform}/include/machine %dir %{_prefix}/%{spu_target_platform}/include/sys %dir %{_prefix}/%{spu_target_platform}/lib %{_prefix}/%{spu_target_platform}/include/*.h %{_prefix}/%{spu_target_platform}/include/machine/*.h %{_prefix}/%{spu_target_platform}/include/sys/*.h %{_prefix}/%{spu_target_platform}/lib/*.[ao] %changelog * Thu Feb 22 2007 Ben Elliston 1.15.0-7 - sbrk now adjusts the stack pointer vector correctly so that GCC runtime stack checking works. * Tue Feb 20 2007 Patrick Mansfield 1.15.0-6 - Change configure.host default to build without atexit malloc for smaller code sizes. * Thu Feb 01 2007 Patrick Mansfield 1.15.0-4 - Apply patches from Vlad Zbarsky so - we have a single __send_to_ppe that is an external function. * Mon Jan 22 2007 Ben Elliston 1.15.0-3 - Change the cross-prefix to /opt/cell. * Fri Jan 19 2007 Ben Elliston 1.15.0-2 - Remove quilt from BuildRequires packages. - Do not link newlib-1.15.0 -> src. Update reference to src directory. - Package %{_prefix}/%{spu_target_platform}/include/{machine,sys}. * Fri Jan 12 2007 Ben Elliston 1.15.0-1 - Separate newlib from the monolithic toolchain RPM.