diff options
author | Chris Johns <chrisj@rtems.org> | 2014-05-13 23:26:09 +1000 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2014-05-13 23:26:09 +1000 |
commit | 9a15c40e1b2ac56a678e79519e1e78160009af92 (patch) | |
tree | 308f3f407a06c4073612b813d4d40ed0c5c5c60e /rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg | |
parent | 4.11/rtems-lm32: Use gcc-4.9.0 and fix gdb simulator build on Windows. (diff) | |
download | rtems-source-builder-9a15c40e1b2ac56a678e79519e1e78160009af92.tar.bz2 |
sb: Implement %source and %patch to manage source and patches.
Remove the numbered source and patches and automatically manage
sources and patches. This removes the overhead in maintaining large
collections of patches.
Diffstat (limited to 'rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg')
-rw-r--r-- | rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg | 65 |
1 files changed, 26 insertions, 39 deletions
diff --git a/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg b/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg index cb410da..5a0c467 100644 --- a/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg +++ b/rtems/config/tools/rtems-nios2-gcc-4.1-newlib-1.19.0-1.cfg @@ -20,8 +20,8 @@ # # The RTEMS 4.11 patches # -Patch0: %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff -Patch10: %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff +%patch add gcc %{rtems_gcc_patches}/nios2/nios2-gcc-4.1-rtems-20110818.diff +%patch add newlib %{rtems_newlib_patches}/nios2/nios2-newlib-1.19.0-rtems-20110720.diff Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release} Summary: GCC v%{gcc_version} and Newlib v%{newlib_version} for target %{_target} on host %{_host} @@ -41,12 +41,12 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # # GCC core and G++ # -Source0: http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2 +%source set gcc http://ftp.rtems.org/ftp/pub/rtems/people/chrisj/nios/nios2-gcc-4.1.tar.bz2 # # Newlib # -Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz +%source set newlib ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # # The GCC library directory @@ -57,48 +57,35 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # Prepare the source code. # %prep + # save the build top directory and cd back to it rather than + # using 'cd ..' because some shells change $PWD to a symlink's + # target location and 'cd ..' fails. + build_top=$(pwd) + # gcc - source_dir_0="gcc-%{gcc_version}" - %setup -q -c -n %{name}-%{version} - cd ${source_dir_0} - %{?patch0:%patch0 %{?patch0_opts:%{patch0_opts}}%{!?patch0_opts:-p1}} - %{?patch1:%patch1 %{?patch1_opts:%{patch1_opts}}%{!?patch1_opts:-p1}} - %{?patch2:%patch2 %{?patch2_opts:%{patch2_opts}}%{!?patch2_opts:-p1}} - %{?patch3:%patch3 %{?patch3_opts:%{patch3_opts}}%{!?patch3_opts:-p1}} - %{?patch4:%patch4 %{?patch4_opts:%{patch4_opts}}%{!?patch4_opts:-p1}} - %{?patch5:%patch5 %{?patch5_opts:%{patch5_opts}}%{!?patch5_opts:-p1}} - %{?patch6:%patch6 %{?patch6_opts:%{patch6_opts}}%{!?patch6_opts:-p1}} - %{?patch7:%patch7 %{?patch7_opts:%{patch7_opts}}%{!?patch7_opts:-p1}} - %{?patch8:%patch8 %{?patch8_opts:%{patch8_opts}}%{!?patch8_opts:-p1}} - %{?patch9:%patch9 %{?patch9_opts:%{patch9_opts}}%{!?patch9_opts:-p1}} - cd .. + source_dir_gcc="gcc-%{gcc_version}" + %source setup gcc -q -c -n %{name}-%{version} + cd ${source_dir_gcc} + %patch setup gcc -p1 + cd ${build_top} # newlib - source_dir_10="newlib-%{newlib_version}" - %setup -q -D -T -n %{name}-%{version} -a10 - cd ${source_dir_10} - %{?patch10:%patch10 %{?patch10_opts:%{patch10_opts}}%{!?patch10_opts:-p1}} - %{?patch11:%patch11 %{?patch11_opts:%{patch11_opts}}%{!?patch11_opts:-p1}} - %{?patch12:%patch12 %{?patch12_opts:%{patch12_opts}}%{!?patch12_opts:-p1}} - %{?patch13:%patch13 %{?patch13_opts:%{patch13_opts}}%{!?patch13_opts:-p1}} - %{?patch14:%patch14 %{?patch14_opts:%{patch14_opts}}%{!?patch14_opts:-p1}} - %{?patch15:%patch15 %{?patch15_opts:%{patch15_opts}}%{!?patch15_opts:-p1}} - %{?patch16:%patch16 %{?patch16_opts:%{patch16_opts}}%{!?patch16_opts:-p1}} - %{?patch17:%patch17 %{?patch17_opts:%{patch17_opts}}%{!?patch17_opts:-p1}} - %{?patch18:%patch18 %{?patch18_opts:%{patch18_opts}}%{!?patch18_opts:-p1}} - %{?patch19:%patch19 %{?patch19_opts:%{patch19_opts}}%{!?patch19_opts:-p1}} - cd .. + source_dir_newlib="newlib-%{newlib_version}" + %source setup newlib -q -D -n %{name}-%{version} + cd ${source_dir_newlib} + %patch setup newlib -p1 + cd ${build_top} # Link newlib into the gcc source tree - %{__rmfile} ${source_dir_0}/newlib - %{__ln_s} $PWD/${source_dir_10}/newlib ${source_dir_0}/newlib + %{__rmfile} ${source_dir_gcc}/newlib + %{__ln_s} $PWD/${source_dir_newlib}/newlib ${source_dir_gcc}/newlib echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE # Fix timestamps - cd ${source_dir_0} + cd ${source_dir_gcc} contrib/gcc_update --touch - cd .. + cd ${build_top} %build %{build_directory} @@ -113,7 +100,7 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz %{host_build_flags} - ../${source_dir_0}/configure \ + ../${source_dir_gcc}/configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --exec_prefix=%{_exec_prefix} \ @@ -142,7 +129,7 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz # Bug in gcc-3.2.1: # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs mkdir -p gcc/include - cp ../${source_dir_0}/gcc/gsyslimits.h gcc/include/syslimits.h + cp ../${source_dir_gcc}/gcc/gsyslimits.h gcc/include/syslimits.h fi # jobs > 1 is broken with this version of gcc @@ -189,4 +176,4 @@ Source10: ftp://sourceware.org/pub/newlib/newlib-%{newlib_version}.tar.gz %{__rmfile} $SB_BUILD_ROOT%{_mandir}/man3/*ffi* # Clean the symlinks away incase the source is a repo - %{__rmfile} ${source_dir_0}/newlib + %{__rmfile} ${source_dir_gcc}/newlib |