Skip to content
Snippets Groups Projects
  • Peter Maydell's avatar
    c0c34c91
    configure: Honour cross-prefix when finding ObjC compiler · c0c34c91
    Peter Maydell authored
    Currently when configure picks an ObjectiveC compiler it doesn't pay
    attention to the cross-prefix.  This isn't a big deal in practice,
    because we only use ObjC on macos and you can't cross-compile to
    macos.  But it's a bit inconsistent.
    
    Rearrange the handling of objcc in configure so that we do the
    same thing that we do with cc and cxx. This means that the logic
    for picking the ObjC compiler goes from:
     if --objcc is specified, use that
     otherwise if clang is available, use that
     otherwise use $cc
    to:
     if --objcc is specified, use that
     otherwise if --cross-prefix is specified, use ${cross_prefix}clang
     otherwise if clang is available, use that
     otherwise use $cc
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1185
    
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Message-Id: <20230418161554.744834-1-peter.maydell@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    c0c34c91
    History
    configure: Honour cross-prefix when finding ObjC compiler
    Peter Maydell authored
    Currently when configure picks an ObjectiveC compiler it doesn't pay
    attention to the cross-prefix.  This isn't a big deal in practice,
    because we only use ObjC on macos and you can't cross-compile to
    macos.  But it's a bit inconsistent.
    
    Rearrange the handling of objcc in configure so that we do the
    same thing that we do with cc and cxx. This means that the logic
    for picking the ObjC compiler goes from:
     if --objcc is specified, use that
     otherwise if clang is available, use that
     otherwise use $cc
    to:
     if --objcc is specified, use that
     otherwise if --cross-prefix is specified, use ${cross_prefix}clang
     otherwise if clang is available, use that
     otherwise use $cc
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1185
    
    
    Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
    Message-Id: <20230418161554.744834-1-peter.maydell@linaro.org>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>