Ticket #30009: default_compiler_from_xcode.patch
File default_compiler_from_xcode.patch, 3.1 KB (added by jmroot (Joshua Root), 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"} { 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 } elseif {[rpm-vercomp $xcodeversion 2.4] >= 0} { 363 return gcc-4.0 364 } else { 365 return gcc 377 366 } 378 367 } 379 368 -
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 " } 3028 set cc_arg "" 3029 switch -glob -- $::macports::xcodeversion { 3030 2.* { set cc_arg "CC=/usr/bin/gcc-4.0 " } 3031 3.[01]* { set cc_arg "CC=/usr/bin/gcc-4.0 " } 3032 3.* { set cc_arg "CC=/usr/bin/gcc-4.2 " } 3033 4.* { set cc_arg "CC=/usr/bin/llvm-gcc-4.2 " } 3034 * { set cc_arg "CC=/usr/bin/cc" } 3034 3035 } 3035 3036 3036 3037 # do the actual configure, build and installation of new base