aboutsummaryrefslogtreecommitdiff
path: root/gcc/configure.ac
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2021-07-27 15:40:21 +0100
committerAndrew Stubbs <ams@codesourcery.com>2021-07-28 13:53:05 +0100
commit1af16666943ef075673501765a13e425e47015cd (patch)
tree125841bf2e8d59d6fa25396abc5e6d9a274c9116 /gcc/configure.ac
parent04600a47224b1ff85c6fb870218b51969cceff21 (diff)
downloadgcc-1af16666943ef075673501765a13e425e47015cd.zip
gcc-1af16666943ef075673501765a13e425e47015cd.tar.gz
gcc-1af16666943ef075673501765a13e425e47015cd.tar.bz2
amdgcn: Fix attributes for LLVM-12 [PR 100208]
This should work for a wider range of LLVM 12 variants now. More work required for LLVM 13 though. gcc/ChangeLog: PR target/100208 * config.in: Regenerate. * config/gcn/gcn-hsa.h (A_FIJI): New define. (A_900): New define. (A_906): New define. (A_908): New define. (ASM_SPEC): Use A_FIJI, A_900, A_906 and A_908. * config/gcn/gcn.c (output_file_start): Adjust attributes according to the assembler capabilities. * config/gcn/mkoffload.c (main): Likewise. * configure: Regenerate. * configure.ac: Add tests for LLVM assembler attribute features.
Diffstat (limited to 'gcc/configure.ac')
-rw-r--r--gcc/configure.ac29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/configure.ac b/gcc/configure.ac
index 26da073..c8e0d63 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -5431,6 +5431,35 @@ EOF
;;
esac
+case "$target" in
+ amdgcn-* | gcn-*)
+ gcc_GAS_CHECK_FEATURE([assembler accepts -mattr=+sram-ecc for fiji],
+ gcc_cv_as_gcn_sram_ecc_fiji,,
+ [-triple=amdgcn--amdhsa -mcpu=fiji -mattr=-xnack -mattr=+sram-ecc],
+ [.amdgcn_target "amdgcn-unknown-amdhsa--gfx803+sram-ecc"],,
+ [AC_DEFINE(HAVE_GCN_SRAM_ECC_FIJI, 1,
+ [Define if your assembler allows -mattr=+sram-ecc for fiji.])])
+ gcc_GAS_CHECK_FEATURE([assembler accepts -mattr=+sram-ecc for gfx900],
+ gcc_cv_as_gcn_sram_ecc_gfx900,,
+ [-triple=amdgcn--amdhsa -mcpu=gfx900 -mattr=-xnack -mattr=+sram-ecc],
+ [.amdgcn_target "amdgcn-unknown-amdhsa--gfx900+sram-ecc"],,
+ [AC_DEFINE(HAVE_GCN_SRAM_ECC_GFX900, 1,
+ [Define if your assembler allows -mattr=+sram-ecc for gfx900.])])
+ gcc_GAS_CHECK_FEATURE([assembler accepts -mattr=+sram-ecc for gfx906],
+ gcc_cv_as_gcn_sram_ecc_gfx906,,
+ [-triple=amdgcn--amdhsa -mcpu=gfx906 -mattr=-xnack -mattr=+sram-ecc],
+ [.amdgcn_target "amdgcn-unknown-amdhsa--gfx906+sram-ecc"],,
+ [AC_DEFINE(HAVE_GCN_SRAM_ECC_GFX906, 1,
+ [Define if your assembler allows -mattr=+sram-ecc for gfx906.])])
+ gcc_GAS_CHECK_FEATURE([assembler accepts -mattr=+sram-ecc for gfx908],
+ gcc_cv_as_gcn_sram_ecc_gfx908,,
+ [-triple=amdgcn--amdhsa -mcpu=gfx908 -mattr=-xnack -mattr=+sram-ecc],
+ [.amdgcn_target "amdgcn-unknown-amdhsa--gfx908+sram-ecc"],,
+ [AC_DEFINE(HAVE_GCN_SRAM_ECC_GFX908, 1,
+ [Define if your assembler allows -mattr=+sram-ecc for gfx908.])])
+ ;;
+esac
+
# ??? Not all targets support dwarf2 debug_line, even within a version
# of gas. Moreover, we need to emit a valid instruction to trigger any
# info to the output file. So, as supported targets are added to gas 2.11,