Ticket #6997: gcc.jam.patch

File gcc.jam.patch, 2.2 KB (added by carson.fenimore@…, 10 years ago)

patch to fix gcc.jam

  • (a) boost_1_49_0b/tools/build/v2/tools/gcc.jam vs. (b) gcc.jam.patch

    a b  
    6161# The compiler command to use is detected in a three step manner:
    6262# 1) If an explicit command is specified by the user, it will be used and must available.
    6363# 2) If only a certain version is specified, it is enforced:
    64 #    - either a command 'g++-VERSION' must be available
     64#    - either a command 'g++VERSION' must be available
    6565#    - or the default command 'g++' must be available and match the exact version.
    6666# 3) Without user-provided restrictions use default 'g++'
    6767rule init ( version ? : command * : options * )
     
    8181    #2): enforce user-provided version
    8282    else if $(version)
    8383    {
    84         tool-command  =  [ common.get-invocation-command-nodefault gcc : "g++-$(version[1])" ] ;
     84        tool-command  =  [ common.get-invocation-command-nodefault gcc : "g++$(version[1])" ] ;
    8585       
    8686        #2.1) fallback: check whether "g++" reports the requested version
    8787        if ! $(tool-command)
     
    103103                    if $(stripped) != $(version)
    104104                    {                                           
    105105                        errors.error "toolset gcc initialization:" :
    106                           "version '$(version)' requested but 'g++-$(version)' not found and version '$(tool-version)' of default '$(tool-command)' does not match" :
     106                          "version '$(version)' requested but 'g++$(version)' not found and version '$(tool-version)' of default '$(tool-command)' does not match" :
    107107                            "initialized from" [ errors.nearest-user-location ] ;
    108108                        tool-command = ;
    109109                    }
     
    114114            else
    115115            {
    116116                errors.error "toolset gcc initialization:" :
    117                              "version '$(version)' requested but neither 'g++-$(version)' nor default 'g++' found" :
     117                             "version '$(version)' requested but neither 'g++$(version)' nor default 'g++' found" :
    118118                             "initialized from" [ errors.nearest-user-location ] ;
    119119            }
    120120        }