Ticket #30008: configurable_default_compiler.patch

File configurable_default_compiler.patch, 3.8 KB (added by jmroot (Joshua Root), 13 years ago)
  • src/port1.0/portconfigure.tcl

     
    182182default configure.f90           {[portconfigure::configure_get_compiler f90]}
    183183default configure.fc            {[portconfigure::configure_get_compiler fc]}
    184184default configure.javac         {[portconfigure::configure_get_compiler javac]}
    185 default configure.compiler      {[portconfigure::configure_get_default_compiler]}
     185default configure.compiler      {${compiler}}
    186186
    187187set_ui_prefix
    188188
     
    349349    }
    350350}
    351351
    352 # internal function to determine the default compiler
    353 proc portconfigure::configure_get_default_compiler {args} {
    354     global macosx_deployment_target
    355     switch -exact ${macosx_deployment_target} {
    356         "10.4"      -
    357         "10.5"      { return gcc-4.0 }
    358         "10.6"      { return gcc-4.2 }
    359         "10.7"      { return llvm-gcc-4.2 }
    360         default     { return gcc }
    361     }
    362 }
    363 
    364352# internal function to find correct compilers
    365353proc portconfigure::configure_get_compiler {type} {
    366354    global configure.compiler prefix developer_dir
  • src/macports1.0/macports.tcl

     
    4444        portinstalltype portarchivemode portarchivepath portarchivetype portautoclean \
    4545        porttrace portverbose keeplogs destroot_umask variants_conf rsync_server rsync_options \
    4646        rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \
    47         mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
     47        mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size compiler configuredistcc configurepipe buildnicevalue buildmakejobs \
    4848        applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \
    4949        macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \
    5050        master_site_local patch_site_local archive_site_local"
     
    5454        registry.path registry.format registry.installtype portarchivemode portarchivepath \
    5555        portarchivetype archivefetch_pubkeys portautoclean porttrace keeplogs portverbose destroot_umask \
    5656        rsync_server rsync_options rsync_dir startupitem_type place_worksymlink macportsuser \
    57         mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size configuredistcc configurepipe buildnicevalue buildmakejobs \
     57        mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size compiler configuredistcc configurepipe buildnicevalue buildmakejobs \
    5858        applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \
    5959        os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target $user_options"
    6060
     
    460460    global macports::configureccache
    461461    global macports::ccache_dir
    462462    global macports::ccache_size
     463    global macports::compiler
    463464    global macports::configuredistcc
    464465    global macports::configurepipe
    465466    global macports::buildnicevalue
     
    792793    if {![info exists macports::ccache_size]} {
    793794        set macports::ccache_size "2G"
    794795    }
     796    if {![info exists macports::compiler]} {
     797        switch -glob -- $::macports::macosx_version {
     798            10.[45]     { set macports::compiler "gcc-4.0" }
     799            10.6        { set macports::compiler "gcc-4.2" }
     800            10.7        { set macports::compiler "llvm-gcc-4.2" }
     801            default     { set macports::compiler "gcc" }
     802        }
     803    }
    795804    if {![info exists macports::configuredistcc]} {
    796805        set macports::configuredistcc no
    797806    }