On 01/03/2019 12:58, Tamar Christina wrote:
> Hi All,
> 
> Due to config.gcc all the options need to be on one line because of the grep
> lines which would select only the first line of the option.
> 
> This causes it not to select the right bits on options that are spread over
> multiple lines when the --with-arch configure option is used.  The issue 
> happens
> silently and you just get a compiler with an incorrect set of default flags.
> 
> This solution just collapses everything back to one line as they were in GCC7.
> Unfortunately this does make some lines quite long.
> 
> Bootstrapped Regtested on aarch64-none-linux-gnu and no issues.
> 
> Ok for GCC-8?
> 
> Thanks,
> Tamar
> 
> gcc/ChangeLog:
> 
> 2019-03-01  Tamar Christina  <tamar.christ...@arm.com>
> 
>       PR target/89517
>       * config/aarch64/aarch64-option-extensions.def (fp, simd, crypto,
>       fp16): Collapse line.
> 

OK.

R.

> 
> rb10764.patch
> 
> diff --git a/gcc/config/aarch64/aarch64-option-extensions.def 
> b/gcc/config/aarch64/aarch64-option-extensions.def
> index 
> 5fe5e3f7dddf622a48a5b9458ef30449a886f395..a1b71cedb14cebe48f6e9e7a5ce3dc202161f2dc
>  100644
> --- a/gcc/config/aarch64/aarch64-option-extensions.def
> +++ b/gcc/config/aarch64/aarch64-option-extensions.def
> @@ -38,26 +38,27 @@
>     should contain a space (" ") separated list of the strings in 'Features'
>     that are required.  Their order is not important.  */
>  
> +/* NOTE: This file is being parsed by config.gcc and so the
> +   AARCH64_OPT_EXTENSION must adhere to a strict format:
> +   1) No space between the AARCH64_OPT_EXTENSION and the opening (.
> +   2) No space between the opening ( and the extension name.
> +   3) No space after the extension name before the ,.
> +   4) Spaces are only allowed after a , and around |.
> +   5) Everything must be on one line.  */
> +
>  /* Enabling "fp" just enables "fp".
>     Disabling "fp" also disables "simd", "crypto", "fp16", "aes", "sha2",
>     "sha3", sm3/sm4 and "sve".  */
> -AARCH64_OPT_EXTENSION("fp", AARCH64_FL_FP, 0, AARCH64_FL_SIMD | 
> AARCH64_FL_CRYPTO |\
> -                   AARCH64_FL_F16 | AARCH64_FL_AES | AARCH64_FL_SHA2 |\
> -                   AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE, "fp")
> +AARCH64_OPT_EXTENSION("fp", AARCH64_FL_FP, 0, AARCH64_FL_SIMD | 
> AARCH64_FL_CRYPTO | AARCH64_FL_F16 | AARCH64_FL_AES | AARCH64_FL_SHA2 | 
> AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE, "fp")
>  
>  /* Enabling "simd" also enables "fp".
>     Disabling "simd" also disables "crypto", "dotprod", "aes", "sha2", "sha3",
>     "sm3/sm4" and "sve".  */
> -AARCH64_OPT_EXTENSION("simd", AARCH64_FL_SIMD, AARCH64_FL_FP, 
> AARCH64_FL_CRYPTO |\
> -                   AARCH64_FL_DOTPROD | AARCH64_FL_AES | AARCH64_FL_SHA2 |\
> -                   AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE,
> -                   "asimd")
> +AARCH64_OPT_EXTENSION("simd", AARCH64_FL_SIMD, AARCH64_FL_FP, 
> AARCH64_FL_CRYPTO | AARCH64_FL_DOTPROD | AARCH64_FL_AES | AARCH64_FL_SHA2 | 
> AARCH64_FL_SHA3 | AARCH64_FL_SM4 | AARCH64_FL_SVE, "asimd")
>  
>  /* Enabling "crypto" also enables "fp" and "simd".
>     Disabling "crypto" disables "crypto", "aes", "sha2", "sha3" and 
> "sm3/sm4".  */
> -AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO, AARCH64_FL_FP | 
> AARCH64_FL_SIMD,\
> -                   AARCH64_FL_AES | AARCH64_FL_SHA2 |AARCH64_FL_SHA3 | 
> AARCH64_FL_SM4,\
> -                   "aes pmull sha1 sha2")
> +AARCH64_OPT_EXTENSION("crypto", AARCH64_FL_CRYPTO, AARCH64_FL_FP | 
> AARCH64_FL_SIMD, AARCH64_FL_AES | AARCH64_FL_SHA2 |AARCH64_FL_SHA3 | 
> AARCH64_FL_SM4, "aes pmull sha1 sha2")
>  
>  /* Enabling or disabling "crc" only changes "crc".  */
>  AARCH64_OPT_EXTENSION("crc", AARCH64_FL_CRC, 0, 0, "crc32")
> @@ -67,8 +68,7 @@ AARCH64_OPT_EXTENSION("lse", AARCH64_FL_LSE, 0, 0, 
> "atomics")
>  
>  /* Enabling "fp16" also enables "fp".
>     Disabling "fp16" disables "fp16", "fp16fml" and "sve".  */
> -AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP,
> -                   AARCH64_FL_F16FML | AARCH64_FL_SVE, "fphp asimdhp")
> +AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP, 
> AARCH64_FL_F16FML | AARCH64_FL_SVE, "fphp asimdhp")
>  
>  /* Enabling or disabling "rcpc" only changes "rcpc".  */
>  AARCH64_OPT_EXTENSION("rcpc", AARCH64_FL_RCPC, 0, 0, "lrcpc")
> 

Reply via email to