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
182 182 default configure.f90 {[portconfigure::configure_get_compiler f90]} 183 183 default configure.fc {[portconfigure::configure_get_compiler fc]} 184 184 default configure.javac {[portconfigure::configure_get_compiler javac]} 185 default configure.compiler { [portconfigure::configure_get_default_compiler]}185 default configure.compiler {${compiler}} 186 186 187 187 set_ui_prefix 188 188 … … 349 349 } 350 350 } 351 351 352 # internal function to determine the default compiler353 proc portconfigure::configure_get_default_compiler {args} {354 global macosx_deployment_target355 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 364 352 # internal function to find correct compilers 365 353 proc portconfigure::configure_get_compiler {type} { 366 354 global configure.compiler prefix developer_dir -
src/macports1.0/macports.tcl
44 44 portinstalltype portarchivemode portarchivepath portarchivetype portautoclean \ 45 45 porttrace portverbose keeplogs destroot_umask variants_conf rsync_server rsync_options \ 46 46 rsync_dir startupitem_type place_worksymlink xcodeversion xcodebuildcmd \ 47 mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size co nfiguredistcc configurepipe buildnicevalue buildmakejobs \47 mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size compiler configuredistcc configurepipe buildnicevalue buildmakejobs \ 48 48 applications_dir frameworks_dir developer_dir universal_archs build_arch macosx_deployment_target \ 49 49 macportsuser proxy_override_env proxy_http proxy_https proxy_ftp proxy_rsync proxy_skip \ 50 50 master_site_local patch_site_local archive_site_local" … … 54 54 registry.path registry.format registry.installtype portarchivemode portarchivepath \ 55 55 portarchivetype archivefetch_pubkeys portautoclean porttrace keeplogs portverbose destroot_umask \ 56 56 rsync_server rsync_options rsync_dir startupitem_type place_worksymlink macportsuser \ 57 mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size co nfiguredistcc configurepipe buildnicevalue buildmakejobs \57 mp_remote_url mp_remote_submit_url configureccache ccache_dir ccache_size compiler configuredistcc configurepipe buildnicevalue buildmakejobs \ 58 58 applications_dir current_phase frameworks_dir developer_dir universal_archs build_arch \ 59 59 os_arch os_endian os_version os_major os_platform macosx_version macosx_deployment_target $user_options" 60 60 … … 460 460 global macports::configureccache 461 461 global macports::ccache_dir 462 462 global macports::ccache_size 463 global macports::compiler 463 464 global macports::configuredistcc 464 465 global macports::configurepipe 465 466 global macports::buildnicevalue … … 792 793 if {![info exists macports::ccache_size]} { 793 794 set macports::ccache_size "2G" 794 795 } 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 } 795 804 if {![info exists macports::configuredistcc]} { 796 805 set macports::configuredistcc no 797 806 }