Changeset 6d235a47 in rtems


Ignore:
Timestamp:
Apr 25, 2010, 5:30:33 AM (9 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, master
Children:
9b4bbd6
Parents:
09a43a73
Message:

Regenerate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/crossrpms/cygwin/i686/i686-pc-cygwin-gcc.spec

    r09a43a73 r6d235a47  
    4242Group:          Development/Tools
    4343Version:        %{gcc_rpmvers}
    44 Release:        0.20090907.0%{?dist}
     44Release:        0.20100225.0%{?dist}
    4545License:        GPL
    4646URL:            http://gcc.gnu.org
     
    5151BuildRequires:  %{_host_rpmprefix}gcc
    5252
     53# FIXME: Disable lto for now, to avoid dependencies on libelf
     54%bcond_with lto
     55
     56# FIXME: Disable python gdb scripts
     57# ATM, no idea how to package them
     58%bcond_with pygdb
     59
     60# FIXME: Disable GCC-plugin
     61# Bug in gcc-4.5-20100318, doesn't build them on x86_84 hosts.
     62%bcond_with plugin
     63
     64# versions of libraries, we conditionally bundle if necessary
     65%global mpc_version     0.8.1
     66%global mpfr_version    2.4.1
     67%global gmp_version     4.3.2
     68%global libelf_version  0.8.13
     69
     70# versions of libraries these distros are known to ship
     71%if 0%{?fc13}
     72%global mpc_provided 0.8.1
     73%global mpfr_provided 2.4.1
     74%global gmp_provided 4.3.1
     75%endif
     76
     77%if 0%{?fc12}
     78%global mpc_provided 0.8
     79%global mpfr_provided 2.4.1
     80%global gmp_provided 4.3.1
     81%endif
     82
     83%if 0%{?fc11}
     84%global mpc_provided %{nil}
     85%global mpfr_provided 2.4.1
     86%global gmp_provided 4.2.4
     87%endif
     88
     89%if 0%{?el6}
     90%global mpc_provided %{nil}
     91# el6 beta ships mpfr but mpfr-devel is missing
     92%global mpfr_provided %{nil}
     93%global gmp_provided 4.3.1
     94%endif
     95
     96%if 0%{?el5}
     97%global mpc_provided %{nil}
     98%global mpfr_provided %{nil}
     99%global gmp_provided 4.1.4
     100%endif
     101
     102%if 0%{?suse11_0}
     103%global mpc_provided %{nil}
     104%global mpfr_provided 2.3.1
     105%global gmp_provided 4.2.2
     106%endif
     107
     108%if 0%{?suse11_1}
     109%global mpc_provided %{nil}
     110%global mpfr_provided 2.3.2
     111%global gmp_provided 4.2.3
     112%endif
     113
     114%if 0%{?suse11_2}
     115%global mpc_provided 0.7
     116%global mpfr_provided 2.4.1
     117%global gmp_provided 4.3.1
     118%endif
     119
     120%if 0%{?cygwin}
     121%global mpc_provided 0.8
     122%global mpfr_provided 2.4.1
     123%global gmp_provided 4.3.1
     124%endif
     125
     126%if 0%{?mingw32}
     127%global mpc_provided 0.8.1
     128%global mpfr_provided 2.4.1
     129%global gmp_provided 4.3.2
     130%endif
     131
     132%if "%{gcc_version}" >= "4.2.0"
     133%endif
     134
    53135%if "%{gcc_version}" >= "4.3.0"
    54 %define _gmp_minvers            4.1
    55 %else
    56 %if "%{gcc_version}" >= "4.2.0"
    57 %endif
    58 %endif
    59 
    60 %if %{defined _gmp_minvers}
    61 BuildRequires: gmp-devel >= %{_gmp_minvers}
    62 %if "%{_build}" != "%{_host}"
    63 BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{_gmp_minvers}
    64 %endif
    65 %endif
    66 
     136%define gmp_required            4.1
     137%define mpfr_required           2.3.1
     138%endif
     139
     140%if "%{gcc_version}" >= "4.3.3"
     141%define cloog_required          0.15
     142%endif
    67143
    68144%if "%{gcc_version}" >= "4.4.0"
    69 %define _mpfr_minvers   2.3.2
    70 %define mpfr_version    2.4.1
    71 %else
    72 %if "%{gcc_version}" >= "4.3.0"
    73 %define _mpfr_minvers   2.3.1
    74 %define mpfr_version    2.3.2
    75 %else
    76 %if "%{gcc_version}" >= "4.2.0"
    77 %endif
    78 %endif
    79 %endif
    80 
    81 %if %{defined _mpfr_minvers}
    82 # FIXME: This is an ugly cludge
    83 %{?fc10:%global mpfr_provided 2.3.2}
    84 %{?fc11:%global mpfr_provided 2.4.1}
    85 %{?fc12:%global mpfr_provided 2.4.1}
    86 %{?suse11_0:%global mpfr_provided 2.3.1}
    87 %{?suse11_1:%global mpfr_provided 2.3.2}
    88 %{?suse11_2:%global mpfr_provided 2.4.1}
    89 %{?cygwin:%global mpfr_provided 2.4.1}
    90 %{?mingw32:%global mpfr_provided %{nil}}
    91 
    92 %if %{defined mpfr_provided}
    93 %if "%{mpfr_provided}" < "%{_mpfr_minvers}"
     145%define mpfr_required           2.3.2
     146%endif
     147
     148%if "%{gcc_version}" >= "4.5.0"
     149%define mpc_required            0.8
     150%if %{with lto}
     151%define libelf_required         0.8.12
     152%endif
     153%endif
     154
     155%if %{defined mpc_required}
     156%if "%{mpc_provided}" >= "%{mpc_required}"
     157%{?fedora:BuildRequires: libmpc-devel >= %{mpc_required}}
     158%{?suse:BuildRequires: mpc-devel >= %{mpc_required}}
     159%if "%{_build}" != "%{_host}"
     160BuildRequires:  %{_host_rpmprefix}mpc-devel >= %{mpc_required}
     161%endif
     162%else
     163%define _build_mpc 1
     164%define gmp_required            4.2
     165%endif
     166%endif
     167
     168%if %{defined gmp_required}
     169%if "%{gmp_provided}" >= "%{gmp_required}"
     170BuildRequires: gmp-devel >= %{gmp_required}
     171%if "%{_build}" != "%{_host}"
     172BuildRequires:  %{_host_rpmprefix}gmp-devel >= %{gmp_required}
     173%endif
     174%else
     175%define _build_gmp 1
     176%endif
     177%endif
     178
     179%if %{defined libelf_required}
     180%if "%{libelf_provided}" >= "%{libelf_required}"
     181BuildRequires: libelf-devel >= %{libelf_required}
     182%if "%{_build}" != "%{_host}"
     183BuildRequires:  %{_host_rpmprefix}libelf-devel >= %{libelf_required}
     184%endif
     185%else
     186%define _build_libelf 1
     187%endif
     188%endif
     189
     190
     191%if %{defined cloog_required}
     192%{?fc11:BuildRequires: cloog-ppl-devel >= %cloog_required}
     193%{?fc12:BuildRequires: cloog-ppl-devel >= %cloog_required}
     194%{?fc13:BuildRequires: cloog-ppl-devel >= %cloog_required}
     195# el6 ships cloog-ppl, but cloog-ppl-devel is missing
     196%{?suse11_2:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
     197%{?suse11_1:BuildRequires: cloog-devel >= %cloog_required, ppl-devel}
     198%endif
     199
     200
     201%if %{defined mpfr_required}
     202%if "%{mpfr_provided}" >= "%{mpfr_required}"
     203BuildRequires: mpfr-devel >= %{mpfr_required}
     204%if "%{_build}" != "%{_host}"
     205BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{mpfr_required}
     206%endif
     207%else
    94208%define _build_mpfr 1
    95 %else
    96 %if "%{_build}" != "%{_host}"
    97 BuildRequires:  %{_host_rpmprefix}mpfr-devel >= %{_mpfr_minvers}
    98 %else
    99 BuildRequires: mpfr-devel >= %{_mpfr_minvers}
    100 %endif
    101 %endif
    102 %else
    103 %define _build_mpfr 1
    104 %endif
    105 
     209%endif
    106210%endif
    107211
     
    124228Requires:       i686-pc-cygwin-gcc-libgcc = %{gcc_rpmvers}-%{release}
    125229
    126 
    127 %define _gcclibdir %{_prefix}/lib
     230%if "%{gcc_version}" >= "4.5.0"
     231BuildRequires:  zlib-devel
     232%if "%{_build}" != "%{_host}"
     233BuildRequires:  %{_host_rpmprefix}zlib-devel
     234%endif
     235%else
     236%endif
     237
     238%global _gcclibdir %{_prefix}/lib
    128239
    129240Source0:        ftp://ftp.gnu.org/gnu/gcc/gcc-%{gcc_version}/gcc-core-%{gcc_pkgvers}.tar.bz2
     
    134245
    135246
    136 # Cygwin patch from
    137 # ftp://cygwin.com/pub/cygwin/release/gcc/gcc-core/gcc-core-3.4.4-3-src.tar.bz2
    138 Source70: gcc-3.4.4-3.patch
    139 
    140 
    141 %if "%{gcc_version}" >= "4.3.0"
     247%if "%{gcc_version}" == "3.4.4"
     248# Cygwin patch extracted from
     249# ftp://sourceware.org/pub/cygwin/release/gcc/gcc-3.4.4-3-src.tar.bz2
     250Patch70: gcc-3.4.4-3.patch
     251
     252Patch71: cygwin-gcc-3.4.4-3.diff
     253%endif
     254%if "%{gcc_version}" == "4.3.4"
     255# Cygwin patch extracted from
     256# ftp://sourceware.org/pub/cygwin/release/gcc4/gcc4-4.3.4-3-src.tar.bz2
     257Patch70: gcc4-4.3.4-3.src.patch
     258
     259Patch71: cygwin-gcc4-4.3.4-3.diff
     260%endif
     261
     262%if 0%{?_build_mpfr}
    142263Source60:    http://www.mpfr.org/mpfr-current/mpfr-%{mpfr_version}.tar.bz2
     264%endif
     265
     266%if 0%{?_build_mpc}
     267Source61:    http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
     268%endif
     269
     270%if 0%{?_build_gmp}
     271Source62:    ftp://ftp.gnu.org/gnu/gmp/gmp-%{gmp_version}.tar.bz2
     272%endif
     273
     274%if 0%{?_build_libelf}
     275Source63:    http://www.mr511.de/software/libelf-%{libelf_version}.tar.gz
    143276%endif
    144277
     
    150283
    151284%setup -q -T -D -n %{name}-%{version} -a0
    152 %{?PATCH0:%patch0 -p0}
     285cd gcc-%{gcc_pkgvers}
     286%{?PATCH0:%patch0 -p1}
     287cd ..
    153288
    154289%setup -q -T -D -n %{name}-%{version} -a1
    155 %{?PATCH1:%patch1 -p0}
     290cd gcc-%{gcc_pkgvers}
     291%{?PATCH1:%patch1 -p1}
     292cd ..
    156293
    157294
     
    167304%endif
    168305
     306%if 0%{?_build_mpc}
     307%setup -q -T -D -n %{name}-%{version} -a61
     308%{?PATCH61:%patch61 -p1}
     309  # Build mpc one-tree style
     310  ln -s ../mpc-%{mpc_version} gcc-%{gcc_pkgvers}/mpc
     311%endif
     312
     313%if 0%{?_build_gmp}
     314%setup -q -T -D -n %{name}-%{version} -a62
     315%{?PATCH62:%patch62 -p1}
     316  # Build gmp one-tree style
     317  ln -s ../gmp-%{gmp_version} gcc-%{gcc_pkgvers}/gmp
     318%endif
     319
     320%if 0%{?_build_libelf}
     321%setup -q -T -D -n %{name}-%{version} -a63
     322%{?PATCH63:%patch63 -p1}
     323  # Build libelf one-tree style
     324  ln -s ../libelf-%{libelf_version} gcc-%{gcc_pkgvers}/libelf
     325%endif
     326
    169327# cygwin patches can't be directly applied through rpm
    170328cd gcc-%{gcc_pkgvers}
    171 patch -p1 -t < %{SOURCE70} || true
     329%if "%{gcc_version}" < "4.0"
     330patch -p1 -t < %{PATCH70} || true
     331%else
     332patch -p2 -t < %{PATCH70} || true
     333%endif
     334%{?PATCH71:patch -p1 < %{PATCH71}}
    172335cd ..
    173336
     
    211374    --enable-threads \
    212375    --with-sysroot=%{_exec_prefix}/i686-pc-cygwin/sys-root \
     376    %{?with_lto:--enable-lto}%{!?with_lto:--disable-lto} \
     377    %{?with_plugin:--enable-plugin}%{!?with_plugin:--disable-plugin} \
    213378    --enable-languages="$languages" $optargs
    214379
     
    272437    rmdir ${RPM_BUILD_ROOT}%{_prefix}/i686-pc-cygwin/include/bits
    273438  fi
     439
     440  # gcc >= 4.5.0: installs weird libstdc++ python bindings.
     441%if ! %{with pygdb}
     442  if test -d ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python; then
     443    rm -rf ${RPM_BUILD_ROOT}%{_datadir}/gcc-%{gcc_version}/python/libstdcxx
     444  fi
     445%endif
    274446
    275447  # Collect multilib subdirectories
     
    318490    *jvgenmain) ;;
    319491    */libgfortran*.*) echo "$i" >> build/files.gfortran ;;
     492    %{!?with_pygdb:*/libstdc++*gdb.py*) rm ${RPM_BUILD_ROOT}/$i ;;} # ignore for now
     493    %{?with_pygdb:*/libstdc++*gdb.py*) >> build/files.g++ ;;}
    320494    */libstdc++.*) echo "$i" >> build/files.g++ ;;
    321495    */libsupc++.*) echo "$i" >> build/files.g++ ;;
     
    448622%{_libexecdir}/gcc/i686-pc-cygwin/%{gcc_version}/cc1%{_exeext}
    449623%{_libexecdir}/gcc/i686-pc-cygwin/%{gcc_version}/collect2%{_exeext}
    450 
     624%if "%{gcc_version}" >= "4.5.0"
     625%{?with_lto:%{_libexecdir}/gcc/i686-pc-cygwin/%{gcc_version}/lto%{_exeext}}
     626%{_libexecdir}/gcc/i686-pc-cygwin/%{gcc_version}/lto-wrapper%{_exeext}
     627%endif
    451628
    452629%files -n i686-pc-cygwin-gcc-libgcc -f build/files.gcc
     
    458635
    459636%if "%{gcc_version}" > "4.0.3"
    460 %if "i686-pc-cygwin" != "bfin-rtems4.10"
    461 %if "i686-pc-cygwin" != "avr-rtems4.10"
    462637%dir %{_gcclibdir}/gcc/i686-pc-cygwin/%{gcc_version}/include/ssp
    463 %endif
    464 %endif
    465638%endif
    466639
     
    497670
    498671%description -n i686-pc-cygwin-gcc-libstdc++
    499 %{_summary}
     672%{summary}
    500673
    501674
Note: See TracChangeset for help on using the changeset viewer.