lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220103144635.5952-1-alexandr.lobakin@intel.com>
Date:   Mon,  3 Jan 2022 15:46:35 +0100
From:   Alexander Lobakin <alexandr.lobakin@...el.com>
To:     cgel.zte@...il.com
Cc:     Alexander Lobakin <alexandr.lobakin@...el.com>,
        torvalds@...ux-foundation.org, nathan@...nel.org,
        ndesaulniers@...gle.com, keescook@...omium.org,
        wang.yong12@....com.cn, xu.xin16@....com.cn,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux-next] tools: compiler-gcc.h: Keep compatible with older GCC versions

From: cgel.zte@...il.com
Date: Sun,  2 Jan 2022 12:02:01 +0000

> From: xu xin <xu.xin16@....com.cn>
> 
> When HOST CC = gcc (GCC) 4.8.5, we found that there is an error occurring:
                           ^^^^^

>From [0]:

Program  Minimal version
GNU C    5.1

This applies to both HOSTCC and CC.

> Undefined __has_attribute as we built the whole kernel and tools.
> 
> To solve this, this patch is given to keep the compatibility with older
> GCC versions.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Co-developed-by: wangyong <wang.yong12@....com.cn>
> Signed-off-by: xu xin <xu.xin16@....com.cn>
> ---
>  tools/include/linux/compiler-gcc.h | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/tools/include/linux/compiler-gcc.h b/tools/include/linux/compiler-gcc.h
> index 8816f06fc6c7..333ed16b3b12 100644
> --- a/tools/include/linux/compiler-gcc.h
> +++ b/tools/include/linux/compiler-gcc.h
> @@ -16,6 +16,10 @@
>  # define __fallthrough __attribute__ ((fallthrough))
>  #endif
>  
> +#ifndef __has_attribute
> +# define __has_attribute(x) 0  /* Compatibility with GCC versions < 5.x */
> +#endif
> +
>  #if __has_attribute(__error__)
>  # define __compiletime_error(message) __attribute__((error(message)))
>  #endif
> -- 
> 2.25.1

[0] https://elixir.bootlin.com/linux/v5.16-rc8/source/Documentation/process/changes.rst#L32

Al

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ