VirtualBox

Changeset 9936

Show
Ignore:
Timestamp:
06/25/08 19:47:18 (5 months ago)
Author:
vboxsync
Message:

configure: allow to specify a recompiler gcc in general

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/configure

    r9733 r9936  
    320320{ 
    321321  test_header gcc 
     322  if [ -n "$CC_COMPAT" ]; then 
     323    if check_avail "$CC_COMPAT" CC_COMPAT really; then 
     324      cc_compat_ver=`$CC_COMPAT -dumpversion` 2>/dev/null 
     325      if [ $? -ne 0 ]; then 
     326        log_failure "cannot execute '$CC_COMPAT -dumpversion'" 
     327        fail really 
     328      fi 
     329      cc_compat_maj=`echo $cc_compat_ver|cut -d. -f1` 
     330      cc_compat_min=`echo $cc_compat_ver|cut -d. -f2` 
     331      if [ $cc_compat_maj -lt 3 \ 
     332         -o \( $cc_compat_maj -eq 3 -a $cc_compat_min -lt 2 \) \ 
     333         -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -lt 1 \) \ 
     334         -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -gt 2 \) \ 
     335         -o $cc_compat_maj -gt 4 ]; then 
     336        log "" 
     337        log "  ** Version $cc_compat_ver of the compatibility gcc found. Expected gcc 3.x with x>1" 
     338        log "  ** or gcc 4.x with 0<x<3" 
     339        fail really 
     340      fi 
     341      cnf_append "VBOX_RECOMPILER_OP_GCC" "$CC_COMPAT" 
     342    fi 
     343  fi 
    322344  if check_avail "$CC" CC really; then 
    323345    cc_ver=`$CC -dumpversion` 2>/dev/null 
     
    347369          log "  ** distributions and call configure with parameter --with-gcc-compat=gcc34." 
    348370          fail really 
    349         fi 
    350         if check_avail "$CC_COMPAT" CC_COMPAT really; then 
    351           cc_compat_ver=`$CC_COMPAT -dumpversion` 2>/dev/null 
    352           if [ $? -ne 0 ]; then 
    353             log_failure "cannot execute '$CC_COMPAT -dumpversion'" 
    354             fail really 
    355           fi 
    356           cc_compat_maj=`echo $cc_compat_ver|cut -d. -f1` 
    357           cc_compat_min=`echo $cc_compat_ver|cut -d. -f2` 
    358           if [ $cc_compat_maj -lt 3 \ 
    359                -o \( $cc_compat_maj -eq 3 -a $cc_compat_min -lt 2 \) \ 
    360                -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -lt 1 \) \ 
    361                -o \( $cc_compat_maj -eq 4 -a $cc_compat_min -gt 2 \) \ 
    362                -o $cc_compat_maj -gt 4 ]; then 
    363             log "" 
    364             log "  ** Version $cc_compat_ver of the compatibility gcc found. Expected gcc 3.x with x>1" 
    365             log "  ** or gcc 4.x with 0<x<3" 
    366             fail really 
    367           fi 
    368           cnf_append "VBOX_RECOMPILER_OP_GCC" "$CC_COMPAT" 
    369371        fi 
    370372      # gcc-4.0 is allowed for Darwin only 
     
    16221624  --with-gcc=PATH          location of the gcc compiler [$CC] 
    16231625  --with-g++=PATH          location of the g++ compiler [$CXX] 
     1626  --with-gcc-compat=PATH   location of the gcc compiler for recompiler [$CC] 
    16241627  --with-kbuild=DIR        kbuild directory [$KBUILDDIR] 
    16251628  --with-iasl=PATH         location of the iasl compiler [$IASL] 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy