summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2010-08-18 10:30:30 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2010-08-18 10:30:30 +0000
commitf1d5b89eba8aae7b232a38ab5110f86b2fdc21bf (patch)
treee47493aea69e8b15f6a6d2ddf98dd349a211a91d /contrib
parentgcc-core-4.5.1-rtems4.11-20100818.diff (diff)
downloadrtems-f1d5b89eba8aae7b232a38ab5110f86b2fdc21bf.tar.bz2
Add bcond_with gcc_stdint.
Diffstat (limited to 'contrib')
-rw-r--r--contrib/crossrpms/gcc/gccnewlib.add4
-rw-r--r--contrib/crossrpms/gcc/prep.add7
2 files changed, 11 insertions, 0 deletions
diff --git a/contrib/crossrpms/gcc/gccnewlib.add b/contrib/crossrpms/gcc/gccnewlib.add
index d46687e20b..fcfc8ccb8d 100644
--- a/contrib/crossrpms/gcc/gccnewlib.add
+++ b/contrib/crossrpms/gcc/gccnewlib.add
@@ -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
diff --git a/contrib/crossrpms/gcc/prep.add b/contrib/crossrpms/gcc/prep.add
index 4c6fcce64c..2aa7a7756e 100644
--- a/contrib/crossrpms/gcc/prep.add
+++ b/contrib/crossrpms/gcc/prep.add
@@ -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}