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 /source-builder/config/gcc-common-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 'source-builder/config/gcc-common-1.cfg')
-rw-r--r-- | source-builder/config/gcc-common-1.cfg | 90 |
1 files changed, 31 insertions, 59 deletions
diff --git a/source-builder/config/gcc-common-1.cfg b/source-builder/config/gcc-common-1.cfg index e8517d6..df24f69 100644 --- a/source-builder/config/gcc-common-1.cfg +++ b/source-builder/config/gcc-common-1.cfg @@ -12,15 +12,6 @@ %endif # -# Select Snapshot Macro Maps if they have been added. -# -%select gcc-snapshot -%select newlib-snapshot -%select mpfr-snapshot -%select mpc-snapshot -%select gmp-snapshot - -# # The package description. # Name: %{_target}-gcc-%{gcc_version}-newlib-%{newlib_version}-%{release} @@ -50,71 +41,52 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) build_top=$(pwd) # gcc and optional the g++ core if separate packages - source_dir_0="gcc-%{gcc_version}" - %setup -q -n gcc-%{gcc_version} - %{?source1:%setup -q -D -T -n gcc-%{gcc_version} -b1} - %{?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}} + source_dir_gcc="gcc-%{gcc_version}" + %source setup gcc -q -n gcc-%{gcc_version} + %patch setup gcc -p1 cd ${build_top} # newlib - source_dir_10="newlib-%{newlib_version}" - %setup -q -D -T -n newlib-%{newlib_version} -b10 - %{?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}} + source_dir_newlib="newlib-%{newlib_version}" + %source setup newlib -q -D -n newlib-%{newlib_version} + %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 # MPFR - source_dir_20="mpfr-%{mpfr_version}" - %setup -q -D -T -n mpfr-%{mpfr_version} -b20 - %{?patch20:%patch20 -p1} + source_dir_mpfr="mpfr-%{mpfr_version}" + %source setup mpfr -q -D -n mpfr-%{mpfr_version} + %patch setup mpfr -p1 cd ${build_top} # Build MPFR one-tree style - %{__rmfile} ${source_dir_0}/mpfr - %{__ln_s} $PWD/${source_dir_20} ${source_dir_0}/mpfr + %{__rmfile} ${source_dir_gcc}/mpfr + %{__ln_s} $PWD/${source_dir_mpfr} ${source_dir_gcc}/mpfr # MPC - source_dir_21="mpc-%{mpc_version}" - %setup -q -D -T -n mpc-%{mpc_version} -b21 - %{?patch21:%patch21 -p1} + source_dir_mpc="mpc-%{mpc_version}" + %source setup mpc -q -D -n mpc-%{mpc_version} + %patch setup mpc -p1 cd ${build_top} # Build MPC one-tree style - %{__rmfile} ${source_dir_0}/mpc - %{__ln_s} $PWD/${source_dir_21} ${source_dir_0}/mpc + %{__rmfile} ${source_dir_gcc}/mpc + %{__ln_s} $PWD/${source_dir_mpc} ${source_dir_gcc}/mpc # GMP - source_dir_22="gmp-%{gmp_version}" - %setup -q -D -T -n gmp-%{gmp_version} -b22 - %{?patch22:%patch22 -p1} + source_dir_gmp="gmp-%{gmp_version}" + %source setup gmp -q -D -n gmp-%{gmp_version} + %patch setup gmp -p1 cd ${build_top} # Build GMP one-tree style - %{__rmfile} ${source_dir_0}/gmp - %{__ln_s} $PWD/${source_dir_22} ${source_dir_0}/gmp + %{__rmfile} ${source_dir_gcc}/gmp + %{__ln_s} $PWD/${source_dir_gmp} ${source_dir_gcc}/gmp - echo "%{gcc_version_message}" > ${source_dir_0}/gcc/DEV-PHASE + echo "%{gcc_version_message}" > ${source_dir_gcc}/gcc/DEV-PHASE # Fix timestamps - cd ${source_dir_0} + cd ${source_dir_gcc} contrib/gcc_update --touch cd ${build_top} @@ -149,7 +121,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %{host_build_flags} - ../${source_dir_0}/configure \ + ../${source_dir_gcc}/configure \ --prefix=%{_prefix} \ --bindir=%{_bindir} \ --exec_prefix=%{_exec_prefix} \ @@ -182,7 +154,7 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) # 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 %{__make} %{?_smp_mflags} all @@ -212,10 +184,10 @@ BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) %{__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_0}/mpfr - %{__rmfile} ${source_dir_0}/mpc - %{__rmfile} ${source_dir_0}/gmp + %{__rmfile} ${source_dir_gcc}/newlib + %{__rmfile} ${source_dir_gcc}/mpfr + %{__rmfile} ${source_dir_gcc}/mpc + %{__rmfile} ${source_dir_gcc}/gmp %testing # Add testing here. |