gcc/gcc.spec

changeset 335
6eb79a12ee37
parent 334
4a34d7a82eab
child 337
f71e028eb3e2
     1.1 --- a/gcc/gcc.spec	Tue Mar 29 20:04:34 2011 +0200
     1.2 +++ b/gcc/gcc.spec	Wed Mar 30 19:35:16 2011 +0200
     1.3 @@ -36,7 +36,7 @@
     1.4  Group:        Compiler
     1.5  License:      GPL
     1.6  Version:      %{V_full}
     1.7 -Release:      20110320
     1.8 +Release:      20110330
     1.9  
    1.10  #   package options
    1.11  %option       with_binutils  yes
    1.12 @@ -49,6 +49,12 @@
    1.13  %option       with_threads   yes
    1.14  %option       with_multilib  no
    1.15  
    1.16 +#   fix intermodule dependencies implicitly
    1.17 +%if "%{with_java}" == "yes"
    1.18 +%define  with_cxx      yes
    1.19 +%define  with_threads  yes
    1.20 +%endif
    1.21 +
    1.22  #   list of sources
    1.23  Source0:      ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-core-%{V_full}.tar.bz2
    1.24  Source1:      ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{V_full}/gcc-g++-%{V_full}.tar.bz2
    1.25 @@ -73,7 +79,7 @@
    1.26  PreReq:       libiconv
    1.27  %endif
    1.28  %if "%{with_java}" == "yes"
    1.29 -BuildPreReq:  zlib
    1.30 +BuildPreReq:  zlib, infozip
    1.31  PreReq:       zlib
    1.32  %endif
    1.33  AutoReq:      no
    1.34 @@ -115,6 +121,7 @@
    1.35          -e 's;\(gmplibs="-lmpc\) \(-lmpfr -lgmp\);\1 -lm \2;' \
    1.36          configure
    1.37      %{l_shtool} subst -v -s \
    1.38 +        -e 's;\(LDEXP_LIB=\)"$LIBS";\1"$LDFLAGS";' \
    1.39          -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \
    1.40          gcc/configure
    1.41      %{l_shtool} subst \
    1.42 @@ -204,7 +211,7 @@
    1.43      AS="$AS" \
    1.44      CC="%{l_cc}" \
    1.45      CFLAGS="%{l_cflags}" \
    1.46 -%if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes"
    1.47 +%if "%{with_cxx}" == "yes"
    1.48      CPPFLAGS="%{l_cppflags}" \
    1.49      LDFLAGS="%{l_ldflags}" \
    1.50  %endif
    1.51 @@ -307,25 +314,34 @@
    1.52      l_libcxxflags="$l_libcxxflags -O0"
    1.53  %endif
    1.54  %if "%{with_profile}" == "yes"
    1.55 +    #   generate profile feedback
    1.56      maketarget="profiledbootstrap"
    1.57      loc_makeflags="%{l_mflags}"
    1.58 +
    1.59 +    #   warn about exceptional build duration for profile feedback
    1.60 +    ( echo "Building profile feedback on some hosts can take many days to complete!"
    1.61 +      echo "Now continuing to build a profiled bootstrap with parallel make logic"
    1.62 +      echo "disabled according to profiling requirements..."
    1.63 +    ) | %{l_rpmtool} msg -b -t warn
    1.64 +
    1.65 +    #   warn about profiled bootstrap requirement of 64-bit arithmetic
    1.66      if [ ".$l_ccisgcc" != .yes ]; then
    1.67 -        ( echo "A preinstalled GCC is recommended when bootstrapping a profiled GCC. If the"
    1.68 -          echo "compiler used to bootstrap GCC doesn't support 64-bit arithmetic, then"
    1.69 -          echo "either runtime or buildtime errors could occur. Regardless of this,"
    1.70 -          echo "parallel make logic is disabled according to profiling requirements."
    1.71 +        ( echo "A preinstalled GCC was not detected although one is recommended for"
    1.72 +          echo "building a profiled bootstrap. Buildtime or runtime errors can occur if"
    1.73 +          echo "the compiler used to build profile feedback doesn't support 64-bit math."
    1.74            echo ""
    1.75            echo "If in doubt, stop now and start the build again with profiling disabled."
    1.76          ) | %{l_rpmtool} msg -b -t warn
    1.77      fi
    1.78  %else
    1.79 +    #   build in three stages
    1.80      maketarget="bootstrap"
    1.81      loc_makeflags="%{l_mflags -O}"
    1.82  %endif
    1.83      case "%{l_platform -t}" in
    1.84          *64-* ) l_cflags="$l_cflags -fPIC"; l_cxxflags="$l_cxxflags -fPIC" ;;
    1.85      esac
    1.86 -%if "%{with_java}" == "yes" || "%{with_fortran}" == "yes" || "%{with_cxx}" == "yes"
    1.87 +%if "%{with_cxx}" == "yes"
    1.88      l_cflags="$l_cflags %{l_cppflags}"
    1.89      l_cxxflags="$l_cxxflags %{l_cppflags}"
    1.90      l_libcflags="$l_libcflags %{l_cppflags}"
    1.91 @@ -340,6 +356,11 @@
    1.92          BOOT_CFLAGS="${l_boot_cflags}" \
    1.93          CFLAGS="${l_cflags}" \
    1.94          CXXFLAGS="${l_cxxflags}" \
    1.95 +%if "%{with_cxx}" == "yes"
    1.96 +        CPPFLAGS="%{l_cppflags}" \
    1.97 +        LDFLAGS="%{l_ldflags}" \
    1.98 +        BOOT_LDFLAGS="%{l_ldflags}" \
    1.99 +%endif
   1.100          LIBCFLAGS="${l_libcflags}" \
   1.101          LIBCXXFLAGS="${l_libcxxflags}" \
   1.102          $maketarget

mercurial