Skip to content
  • Peter Maydell's avatar
    fb59dabd
    configure: Don't claim 'unsupported host OS' when better message available · fb59dabd
    Peter Maydell authored
    
    
    The change in commit 898be3e0 which made completely
    unrecognized OSes cause an error_exit "Unsupported host OS"
    has some unfortunate unintended effects:
     * if you run 'configure --help' on an unsupported host OS
       (eg if intending to use it as a build machine for a
       cross compile to a supported host) then the message
       is printed instead of --help
     * if the C compiler doesn't work or is missing (eg if
       you passed an incorrect --cross-prefix by mistake)
       the message is printed instead of the more useful
       'compiler does not exist or does not work' message
    
    Fix this by postponing the error_exit in this situation
    until later, when we have already identified the more
    useful cases for this.
    
    The long term fix for this would be to move handling
    of --help much further up in the configure script,
    and make its output not dependent on checks that configure
    runs. However for 2.9 this would be too invasive.
    
    Reported-by: default avatarStefan Weil <sw@weilnetz.de>
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
    Tested-by: default avatarStefan Weil <sw@weilnetz.de>
    fb59dabd
    configure: Don't claim 'unsupported host OS' when better message available
    Peter Maydell authored
    
    
    The change in commit 898be3e0 which made completely
    unrecognized OSes cause an error_exit "Unsupported host OS"
    has some unfortunate unintended effects:
     * if you run 'configure --help' on an unsupported host OS
       (eg if intending to use it as a build machine for a
       cross compile to a supported host) then the message
       is printed instead of --help
     * if the C compiler doesn't work or is missing (eg if
       you passed an incorrect --cross-prefix by mistake)
       the message is printed instead of the more useful
       'compiler does not exist or does not work' message
    
    Fix this by postponing the error_exit in this situation
    until later, when we have already identified the more
    useful cases for this.
    
    The long term fix for this would be to move handling
    of --help much further up in the configure script,
    and make its output not dependent on checks that configure
    runs. However for 2.9 this would be too invasive.
    
    Reported-by: default avatarStefan Weil <sw@weilnetz.de>
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Reviewed-by: default avatarStefan Weil <sw@weilnetz.de>
    Tested-by: default avatarStefan Weil <sw@weilnetz.de>
Loading