diff options
Diffstat (limited to 'scripts/gcc3newlib/gccnewlib.add')
-rw-r--r-- | scripts/gcc3newlib/gccnewlib.add | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/scripts/gcc3newlib/gccnewlib.add b/scripts/gcc3newlib/gccnewlib.add index 2e8fb89533..2674f83441 100644 --- a/scripts/gcc3newlib/gccnewlib.add +++ b/scripts/gcc3newlib/gccnewlib.add @@ -25,8 +25,8 @@ Version: gcc@gcc_version@newlib@newlib_version@ # gcc 2.95.x Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz Source1: ftp://sources.redhat.com/pub/newlib/newlib-@newlib_version@.tar.gz -Patch0: gcc-@gcc_version@-rtems-@gcc_patch_version@.diff -Patch1: newlib-@newlib_version@-rtems-@newlib_patch_version@.diff +@PATCH1@ +@PATCH3@ Buildroot: %{_tmppath}/%{name} # @@ -60,10 +60,10 @@ This is gcc's and newlib C Library's sources with patches for RTEMS. %prep # untar the sources inside @target_alias@-gcc-newlib -%setup -c -n %{name} -a 0 -a 1 +%setup -c -n %{name} @SETUP@ -%patch0 -p0 -%patch1 -p0 +@PATCH2@ +@PATCH4@ # Copy the C library into gcc's source tree ln -s ../newlib-@newlib_version@/newlib gcc-@gcc_version@ @@ -73,9 +73,9 @@ This is gcc's and newlib C Library's sources with patches for RTEMS. cd build # HACK: This should be %{target} != %{build}, but SuSE's rpm screws it. -# %if "%{target_os}" != "%{build_os}" -# CONFIGURE_ARGS="--build=%{_build} --host=%{_target}" -# %endif +%if "%{_target_os}" != "%{_build_os}" + CONFIGURE_ARGS="--build=%{_build} --host=%{_target}" +%endif ../gcc-@gcc_version@/configure $CONFIGURE_ARGS --target=@target_alias@ \ --with-gnu-as --with-gnu-ld --with-newlib --verbose \ @@ -86,25 +86,32 @@ This is gcc's and newlib C Library's sources with patches for RTEMS. %install cd build - # Bug in gcc-2.95.1: It doesn't build this installation directory - # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc - ../gcc-@gcc_version@/mkinstalldirs \ - $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin - +# # Bug in gcc-2.95.1: It doesn't build this installation directory +# # If it doesn't find it, gcc doesn't install @target_alias@/bin/gcc +# ../gcc-@gcc_version@/mkinstalldirs \ +# $RPM_BUILD_ROOT%{_prefix}/@target_alias@/bin +# + make prefix=$RPM_BUILD_ROOT%{_prefix} install cd @target_alias@/newlib make prefix=$RPM_BUILD_ROOT%{_prefix} install-info + # Bug in gcc-3.0.x: It puts the build dirs into *.la files + files=`find ${RPM_BUILD_ROOT}%{_prefix}/@target_alias@/lib -name '*.la'` + for i in $files; do + rm -f $i + done + # cd back to build/ cd ../.. # Bug in gcc-2.95.x: It bogusly tries to share cpp for all targets. # Rename it to target_alias-cpp - if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@; - then - mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \ - $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@ - fi +# if test -f $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@; +# then +# mv $RPM_BUILD_ROOT%{_prefix}/bin/cpp@exe_ext@ \ +# $RPM_BUILD_ROOT%{_prefix}/bin/@target_alias@-cpp@exe_ext@ +# fi # gzip info files gzip -f $RPM_BUILD_ROOT%{_prefix}/info/*.info 2>/dev/null |