Changes between Version 18 and Version 19 of UsingTheRightCompiler


Ignore:
Timestamp:
Apr 7, 2013, 5:38:46 PM (11 years ago)
Author:
neverpanic (Clemens Lang)
Comment:

remove references to gcc_select, which is no longer the way to change the default compiler

Legend:

Unmodified
Added
Removed
Modified
  • UsingTheRightCompiler

    v18 v19  
    1717The default version of gcc can be run simply as "`gcc`".
    1818There's also "`cc`" which points to the default compiler (which might not necessarily be gcc).
    19 The default gcc can be changed using the "`gcc_select`" command.
     19The default gcc can be changed using the "`port select`" mechanism.
    2020Some users may have used this command to change their default gcc,
    2121for example on Leopard to test new functionality in gcc 4.2,
     
    2828which have different capabilities than the Apple versions of gcc.
    2929For example, only the Apple versions can create universal binaries in a single step.
    30 The gcc_select port can be used to make any of them the default compiler.
     30The port select mechanism can be used to make any of them the default compiler.
    3131So we cannot rely on "`gcc`" being any particular version of gcc with any particular capabilities,
    3232and "`cc`" varies by Xcode version as well.
    3333
    34 Most port authors will not have used "`gcc_select`"
     34Most port authors will not have used "`port select --set gcc $value`"
    3535and will therefore have the usual default version of gcc on their machine,
    3636and will not have tested to see what happens if a different gcc is selected.
     
    4141It does this by specifying the desired compiler's complete path in the CC environment variable
    4242during the port's configure phase.
    43 For example, on OS X 10.4 and 10.5, CC is set to the value "`/usr/bin/gcc-4.0`"
     43For example, on OS X 10.8, CC is set to the value "`/usr/bin/clang`"
    4444so that there is no ambiguity.
    4545