>>> On 09.02.16 at 21:01, <andrew.coop...@citrix.com> wrote:
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> ---
> CC: Jan Beulich <jbeul...@suse.com>
> 
> What is the GCC version check supposed to be achieving here?  GCC has
> supported this syntax since 3.0

This is best answered by looking at where we've got these headers
from - the gnu-efi package. It has ...

> --- a/xen/include/asm-x86/x86_64/efibind.h
> +++ b/xen/include/asm-x86/x86_64/efibind.h
> @@ -274,7 +274,7 @@ typedef uint64_t   UINTN;
>  #endif
>  #endif
>  
> -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)
> +#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4) || __clang__
>  #define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
>  #else
>  /* for x86_64, EFI_FUNCTION_WRAPPER must be defined */

/* for x86_64, EFI_FUNCTION_WRAPPER must be defined */
#if defined(HAVE_USE_MS_ABI)
#define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
#else
UINTN uefi_call_wrapper(void *func, unsigned long va_num, ...);
#endif
#define EFI_FUNCTION __attribute__((ms_abi))

I think this makes clear that the needed feature here is the
attribute, which certainly wasn't available in older gcc.

With that the question is whether the Clang case won't also need
a version check, since I can't imagine them having supported this
prior to gcc introducing it.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to