OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   19-Apr-2007 13:24:05
  Branch: HEAD                             Handle: 2007041912240500

  Modified files:
    openpkg-src/gcc         gcc.spec

  Log:
    replace as/ld availability assumption with feature testing; together
    with [34937] this eliminates the need for the with_binutils option
    entirely and also removes a linux/freebsd platform assumption;
    sponsored by BinckBank

  Summary:
    Revision    Changes     Path
    1.136       +12 -18     openpkg-src/gcc/gcc.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/gcc/gcc.spec
  ============================================================================
  $ cvs diff -u -r1.135 -r1.136 gcc.spec
  --- openpkg-src/gcc/gcc.spec  19 Apr 2007 11:22:46 -0000      1.135
  +++ openpkg-src/gcc/gcc.spec  19 Apr 2007 11:24:05 -0000      1.136
  @@ -37,7 +37,7 @@
   Group:        Compiler
   License:      GPL
   Version:      %{V_full}
  -Release:      20070214
  +Release:      20070419
   
   #   package options
   %option       with_cxx       yes
  @@ -46,7 +46,6 @@
   %option       with_fortran   no
   %option       with_optimize  yes
   %option       with_profile   no
  -%option       with_binutils  yes
   %option       with_threads   yes
   %option       with_multilib  no
   
  @@ -59,10 +58,8 @@
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20060622, make
   PreReq:       OpenPKG, openpkg >= 20060622
  -%if "%{with_binutils}" == "yes"
   BuildPreReq:  binutils >= 2.14
   PreReq:       binutils >= 2.14
  -%endif
   %if "%{with_fortran}" == "yes"
   BuildPreReq:  mpfr
   PreReq:       mpfr
  @@ -118,16 +115,12 @@
   
       #   determine ld(1) and as(1) usage
       l_with_gnu_ld_as=""
  -%if "%{with_binutils}" == "yes"
  -    l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld 
--with-ld=%{l_prefix}/bin/ld"
  -    l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as 
--with-as=%{l_prefix}/bin/as"
  -%else
  -    case "%{l_platform -t}" in
  -       *-linux* | *-freebsd* )
  -           l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as --with-gnu-ld"
  -           ;;
  -    esac
  -%endif
  +    LD="%{l_tool_locate ld ld}"
  +    AS="%{l_tool_locate as as}"
  +    echo "$LD" | grep "^/" >/dev/null && 
l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-ld=\"$LD\""
  +    echo "$AS" | grep "^/" >/dev/null && 
l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-as=\"$AS\""
  +    "$LD" --version 2>/dev/null | grep "^GNU ld "        >/dev/null && 
l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld"
  +    "$AS" --version 2>/dev/null | grep "^GNU assembler " >/dev/null && 
l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as"
   
       #   determine threads usage
   %if "%{with_threads}" == "yes"
  @@ -205,11 +198,12 @@
       case "%{l_platform -t}" in
           alpha*-tru64* ) if [ ".$l_ccisgcc" = .no ]; then 
l_libcflags="$l_libcflags -ieee"; fi ;;
       esac
  -%if "%{with_binutils}" == "yes"
       #   at least GNU as from GNU binutils supports -pipe always
  -    l_boot_cflags="$l_boot_cflags -pipe"
  -    l_libcxxflags="$l_libcxxflags -pipe"
  -%endif
  +    AS="%{l_tool_locate as as}"
  +    "$AS" --version 2>/dev/null | grep "^GNU assembler " >/dev/null && {
  +        l_boot_cflags="$l_boot_cflags -pipe";
  +        l_libcxxflags="$l_libcxxflags -pipe";
  +    }
   %if "%{with_optimize}" == "yes"
       #   conservatively optimize the generated program code
       #   (also _tune_ for particular CPUs, but _without_ requiring these 
CPUs!)
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to