diff mbox

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

Message ID 5447BD2B.7020203@arm.com
State New
Headers show

Commit Message

Kyrylo Tkachov Oct. 22, 2014, 2:20 p.m. UTC
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.

Comments

Kyrylo Tkachov Oct. 31, 2014, 2:34 p.m. UTC | #1
On 22/10/14 15:20, Kyrill Tkachov wrote:
> 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?

Ping.
I've committed the 4.9 version of this to that branch.

Thanks,
Kyrill

>
> 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.
Marcus Shawcroft Nov. 5, 2014, 1:20 p.m. UTC | #2
On 22 October 2014 15:20, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> 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.

OK /Marcus
diff mbox

Patch

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						\