mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-08-29 06:06:31 +08:00
Add bcond_with gcc_stdint.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user