Add bcond_with gcc_stdint.

This commit is contained in:
Ralf Corsepius
2010-08-18 10:30:30 +00:00
parent aea6410556
commit f1d5b89eba
2 changed files with 11 additions and 0 deletions
+4
View File
@@ -33,6 +33,10 @@ BuildRequires: %{_host_rpmprefix}gcc
# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
%bcond_with plugin
# EXPERIMENTAL: Use gcc's stdint.h instead of newlib's
# Should be applicable to gcc >= 4.5.0
%bcond_with gcc_stdint
# versions of libraries, we conditionally bundle if necessary
%global mpc_version 0.8.1
%global mpfr_version 2.4.2
+7
View File
@@ -33,6 +33,10 @@ cd ..
%{?PATCH5:%patch5 -p0}
%endif
%if %{with gcc_stdint}
sed -i -e '/thread_file=.*rtems/,/use_gcc_stdint=wrap/ { s/use_gcc_stdint=wrap/use_gcc_stdint=provide/}' gcc-%{gcc_pkgvers}/gcc/config.gcc
%endif
%if %build_newlib
%setup -q -T -D -n %{name}-%{version} -a50
cd newlib-%{newlib_version}
@@ -40,6 +44,9 @@ cd newlib-%{newlib_version}
cd ..
# Copy the C library into gcc's source tree
ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_pkgvers}
%if %{with gcc_stdint}
rm newlib-%{newlib_version}/newlib/libc/include/stdint.h
%endif
%endif
%if 0%{?_build_mpfr}