qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-4.0 v2 1/7] configure: Add a test for the mi


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH for-4.0 v2 1/7] configure: Add a test for the minimum compiler version
Date: Fri, 7 Dec 2018 10:27:55 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 12/4/18 9:32 AM, Thomas Huth wrote:
> +# Check whether the compiler matches our minimum requirements:
> +cat > $TMPC << EOF
> +#if defined(__clang_major__) && defined(__clang_minor__)
> +# ifdef __apple_build_version__
> +#  if __clang_major__ < 5 || (__clang_major__ == 5 && __clang_minor__ < 1)
> +#   error You need at least XCode Clang v5.1 to compile QEMU
> +#  endif
> +# else
> +#  if __clang_major__ < 3 || (__clang_major__ == 3 && __clang_minor__ < 4)
> +#   error You need at least Clang v3.4 to compile QEMU
> +#  endif
> +# endif
> +#elif defined(__GNUC__) && defined(__GNUC_MINOR__)
> +# if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8)
> +#  error You need at least GCC v4.8 to compile QEMU
> +# endif
> +#else
> +# error You either need GCC or Clang to compiler QEMU
> +#endif
> +int main (void) { return 0; }
> +EOF
> +if ! compile_prog "" "" ; then
> +    error_exit "You need at least GCC v4.8 or Clang v3.4 (or XCode Clang 
> v5.1)"
> +fi

I wonder if we could capture the actual error message that you used during the
test and feed that back to the user.  That said,

Reviewed-by: Richard Henderson <address@hidden>


r~




reply via email to

[Prev in Thread] Current Thread [Next in Thread]