Ticket #30009: default_compiler_from_xcode.2.patch
File default_compiler_from_xcode.2.patch, 2.9 KB (added by jeremyhu (Jeremy Huddleston Sequoia), 13 years ago) |
---|
-
src/port1.0/portconfigure.tcl
352 352 353 353 # internal function to determine the default compiler 354 354 proc portconfigure::configure_get_default_compiler {args} { 355 global macosx_deployment_target developer_dir 356 switch -exact ${macosx_deployment_target} { 357 "10.4" - 358 "10.5" { 359 if {![file executable /usr/bin/gcc-4.0]} { 360 if {[file executable /usr/bin/gcc-4.2]} { 361 return gcc-4.2 362 } elseif {[file executable ${developer_dir}/usr/bin/llvm-gcc-4.2]} { 363 return llvm-gcc-4.2 364 } 365 } 366 return gcc-4.0 367 } 368 "10.6" { 369 if {![file executable /usr/bin/gcc-4.2] && 370 [file executable ${developer_dir}/usr/bin/llvm-gcc-4.2]} { 371 return llvm-gcc-4.2 372 } 373 return gcc-4.2 374 } 375 "10.7" { return llvm-gcc-4.2 } 376 default { return gcc } 355 global xcodeversion 356 if {$xcodeversion == "none" || $xcodeversion == ""} { 357 return gcc 358 } elseif {[rpm-vercomp $xcodeversion 4.0] >= 0} { 359 return llvm-gcc-4.2 360 } elseif {[rpm-vercomp $xcodeversion 3.2] >= 0} { 361 return gcc-4.2 362 } else { 363 return gcc-4.0 377 364 } 378 365 } 379 366 -
src/macports1.0/macports.tcl
374 374 set macports::xcodeversion "3.2.6" 375 375 } elseif {$devtoolscore_v >= 1204.0} { 376 376 set macports::xcodeversion "3.1.4" 377 } elseif {$devtoolscore_v > 921.0} { 378 # XXX find actual version corresponding to 3.1 377 } elseif {$devtoolscore_v >= 1100.0} { 379 378 set macports::xcodeversion "3.1" 380 379 } elseif {$devtoolscore_v >= 921.0} { 381 380 set macports::xcodeversion "3.0" … … 3026 3025 append configure_args " --with-unsupported-prefix" 3027 3026 } 3028 3027 3029 set cc_arg "" 3030 switch -glob -- $::macports::macosx_version { 3031 10.[45] { set cc_arg "CC=/usr/bin/gcc-4.0 " } 3032 10.6 { set cc_arg "CC=/usr/bin/gcc-4.2 " } 3033 10.* { set cc_arg "CC=/usr/bin/llvm-gcc-4.2 " } 3034 } 3028 # Choose a sane compiler 3029 set cc_arg "CC=/usr/bin/cc" 3035 3030 3036 3031 # do the actual configure, build and installation of new base 3037 3032 ui_msg "Installing new MacPorts release in $prefix as $owner:$group; permissions $perms; Tcl-Package in $tclpackage\n"