From 4f26bdb2f0372abc1273f16594e9ac1fd96e0559 Mon Sep 17 00:00:00 2001 From: Chris Johns Date: Mon, 1 Apr 2013 15:19:56 +1100 Subject: Add Canadian Cross support. Add support to build MinGW tools using Cygwin. This is a Canadian cross build. Do not expand the directives when parsing a configuration file. Hold in the package object the text as read from the configuration file. Still parse the logic but leave the macros. This allows a configuration to be varied when the build happens. The Canadian cross uses this to build a build compiler used to build a Cxc runtime. Add Cxc support to the build module. In the defaults add rm and rmfile macros, add Cxc paths and pre-build script code. In the setbuilder check for a Cxc build and if so and the package allow Cxc build the build host version then the host target version. Add cygiwn support to the defaults processing and to the Windows module. --- source-builder/config/gcc-4.6-1.cfg | 151 +----------------------------------- 1 file changed, 2 insertions(+), 149 deletions(-) (limited to 'source-builder/config/gcc-4.6-1.cfg') diff --git a/source-builder/config/gcc-4.6-1.cfg b/source-builder/config/gcc-4.6-1.cfg index 377aa13..1d04f96 100644 --- a/source-builder/config/gcc-4.6-1.cfg +++ b/source-builder/config/gcc-4.6-1.cfg @@ -5,26 +5,6 @@ # newlib, MPFR, MPC, and GMP in a one-tree build configuration. # -# -# Default to C++ on. -# -%ifn %{defined enable_cxx} -%define enable_cxx 1 -%endif - -%include %{_configdir}/checks.cfg - -%ifn %{defined gcc_version_message} -%error No GCC Version message defined. -%endif - -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} -Version: %{gcc_version} -Release: %{release} -URL: http://gcc.gnu.org/ -BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n) - # # Source # @@ -52,133 +32,6 @@ Source21: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz Source22: ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2 # -# The GCC library directory +# GCC Common build script. # -%global _gcclibdir %{_prefix}/lib - -# -# Prepare the source code. -# -%prep - # gcc core - %setup -q -c -n %{name}-%{version} -a0 - cd gcc-%{gcc_version} - %{?patch0:%patch0 -p1} - cd .. - - # g++ - %{?source1:%setup -q -D -n %{name}-%{version} -a1} - cd gcc-%{gcc_version} - %{?patch1:%patch1 -p1} - cd .. - - # newlib - %setup -q -D -n %{name}-%{version} -a10 - cd newlib-%{newlib_version} - %{?patch10:%patch10 -p1} - cd .. - # Link newlib into the gcc source tree - ln -s ../newlib-%{newlib_version}/newlib gcc-%{gcc_version} - - # MPFR - %setup -q -D -n %{name}-%{version} -a20 - cd mpfr-%{mpfr_version} - %{?patch20:%patch20 -p1} - cd .. - # Build MPFR one-tree style - ln -s ../mpfr-%{mpfr_version} gcc-%{gcc_version}/mpfr - - # MPC - %setup -q -D -n %{name}-%{version} -a21 - cd mpc-%{mpc_version} - %{?patch21:%patch21 -p1} - cd .. - # Build MPC one-tree style - ln -s ../mpc-%{mpc_version} gcc-%{gcc_version}/mpc - - # GMP - %setup -q -D -n %{name}-%{version} -a22 - cd gmp-%{gmp_version} - %{?patch22:%patch22 -p1} - cd .. - # Build GMP one-tree style - ln -s ../gmp-%{gmp_version} gcc-%{gcc_version}/gmp - - echo "%{gcc_version_message}" > gcc-%{gcc_version}/gcc/DEV-PHASE - - # Fix timestamps - cd gcc-%{gcc_version} - contrib/gcc_update --touch - cd .. - -%build - export PATH="%{_bindir}:${PATH}" - mkdir -p build - cd build - languages="c" -%if %{enable_cxx} - languages="$languages,c++" -%endif -%if "%{_build}" != "%{_host}" - CFLAGS_FOR_BUILD="-g -O2 -Wall" \ - CC="%{_host}-gcc ${SB_OPT_FLAGS}" \ -%else - # gcc is not ready to be compiled with -std=gnu99 - CC=$(echo "%{__cc} ${SB_OPT_FLAGS}" | sed -e 's,-std=gnu99 ,,') \ -%endif - ../gcc-%{gcc_version}/configure \ - --prefix=%{_prefix} \ - --bindir=%{_bindir} \ - --exec_prefix=%{_exec_prefix} \ - --includedir=%{_includedir} \ - --libdir=%{_gcclibdir} \ - --libexecdir=%{_libexecdir} \ - --mandir=%{_mandir} \ - --infodir=%{_infodir} \ - --datadir=%{_datadir} \ - --build=%_build --host=%_host \ - --target=%{_target} \ - --disable-libstdcxx-pch \ - --with-gnu-as --with-gnu-ld --verbose \ - --with-newlib \ - --with-system-zlib \ - --disable-nls --without-included-gettext \ - --disable-win32-registry \ - --enable-version-specific-runtime-libs \ - --disable-lto \ - %{?with_threads:--enable-threads}%{!?with_threads:--disable-threads} \ - %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \ - --enable-newlib-io-c99-formats \ - %{?with_iconv:--enable-newlib-iconv} \ - --enable-languages="$languages" - -%if "%_host" != "%_build" - # Bug in gcc-3.2.1: - # Somehow, gcc doesn't get syslimits.h right for Cdn-Xs - mkdir -p gcc/include - cp ../gcc-%{gcc_version}/gcc/gsyslimits.h gcc/include/syslimits.h -%endif - - %{__make} %{?_smp_mflags} all - cd .. - -%install - export PATH="%{_bindir}:${PATH}" - rm -rf $SB_BUILD_ROOT - - cd build - %{__make} DESTDIR=$SB_BUILD_ROOT install - cd .. - - # libiberty doesn't honor --libdir, but always installs to a - # magically guessed _libdir - rm -f ${SB_BUILD_ROOT}%{_libdir}/libiberty.a - - # We use the version from binutils - rm -f $SB_BUILD_ROOT%{_bindir}/%{_target}-c++filt%{_exeext} - - # We don't ship info/dir - rm -f $SB_BUILD_ROOT%{_infodir}/dir - - # Don't want libffi's man-pages - rm -f $SB_BUILD_ROOT%{_mandir}/man3/*ffi* +%include %{_configdir}/gcc-common-1.cfg -- cgit v1.2.3