This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][AArch64][4.8] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround


Hi all,

This is the 4.8 backport of the LINK_SPEC changes to pass down the linker option
--fix-cortex-a53-835769

Bootstrapped and tested on aarch64-none-linux-gnu.
This depends on the patches under review at:
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01757.html
and
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01758.html

Ok for that branch after the prerequisites go in?

Thanks,
Kyrill

2014-10-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>

        * config/aarch64/aarch64-elf-raw.h (CA53_ERR_835769_SPEC): Define.
        (LINK_SPEC): Include CA53_ERR_835769_SPEC.
        * config/aarch64/aarch64-linux.h (CA53_ERR_835769_SPEC): Define.
        (LINK_SPEC): Include CA53_ERR_835769_SPEC.
commit 76c4714df214a05acc1f28d898a93c5324129b20
Author: Kyrill Tkachov <kyrylo.tkachov@arm.com>
Date:   Mon Oct 13 11:25:41 2014 +0000

    [AArch64] Add LINK_SPECs for A53 erratum fix

diff --git a/gcc/config/aarch64/aarch64-elf-raw.h b/gcc/config/aarch64/aarch64-elf-raw.h
index 1cd0155..9515d11 100644
--- a/gcc/config/aarch64/aarch64-elf-raw.h
+++ b/gcc/config/aarch64/aarch64-elf-raw.h
@@ -25,8 +25,17 @@
 #define STARTFILE_SPEC " crti%O%s crtbegin%O%s crt0%O%s"
 #define ENDFILE_SPEC " crtend%O%s crtn%O%s"
 
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
 #ifndef LINK_SPEC
-#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X"
+#define LINK_SPEC "%{mbig-endian:-EB} %{mlittle-endian:-EL} -X" \
+                  CA53_ERR_835769_SPEC
 #endif
 
 #endif /* GCC_AARCH64_ELF_RAW_H */
diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h
index 4e6e23a..a012bae 100644
--- a/gcc/config/aarch64/aarch64-linux.h
+++ b/gcc/config/aarch64/aarch64-linux.h
@@ -34,7 +34,16 @@
    -X						\
    %{mbig-endian:-EB} %{mlittle-endian:-EL}"
 
-#define LINK_SPEC LINUX_TARGET_LINK_SPEC
+#ifdef TARGET_FIX_ERR_A53_835769_DEFAULT
+#define CA53_ERR_835769_SPEC \
+  " %{!mno-fix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#else
+#define CA53_ERR_835769_SPEC \
+  " %{mfix-cortex-a53-835769:--fix-cortex-a53-835769}"
+#endif
+
+#define LINK_SPEC LINUX_TARGET_LINK_SPEC \
+                  CA53_ERR_835769_SPEC
 
 #define TARGET_OS_CPP_BUILTINS()		\
   do						\

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]