[AArch64] LINK_SPEC changes for Cortex-A53 erratum 835769 workaround
authorKyrylo Tkachov <kyrylo.tkachov@arm.com>
Fri, 24 Oct 2014 11:32:40 +0000 (11:32 +0000)
committerKyrylo Tkachov <ktkachov@gcc.gnu.org>
Fri, 24 Oct 2014 11:32:40 +0000 (11:32 +0000)
     * 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.

From-SVN: r216639

gcc/ChangeLog
gcc/config/aarch64/aarch64-elf-raw.h
gcc/config/aarch64/aarch64-linux.h

index 918426d7dd3504a653af83df0a7830aeea7630d1..a0e43ae21b4d6fa97a5a350facf8361ca5040023 100644 (file)
@@ -1,3 +1,10 @@
+2014-10-24  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.
+
 2014-10-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        * config/aarch64/aarch64.h (ADJUST_INSN_LENGTH): Wrap definition in
index b9d4e8db8f06e3dcb5623a15481aae99e116fd37..16ad5c89450ca1363e5fcee22e799adef43094f3 100644 (file)
   " crtend%O%s crtn%O%s " \
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.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 \
-  -maarch64elf%{mabi=ilp32*:32}%{mbig-endian:b}"
+  -maarch64elf%{mabi=ilp32*:32}%{mbig-endian:b}" \
+  CA53_ERR_835769_SPEC
 #endif
 
 #endif /* GCC_AARCH64_ELF_RAW_H */
index 3fbde9388058ba417cb8c351ef7de6459347943e..d375624ab0af60ab0083b94e819973456ea9eae2 100644 (file)
    %{mbig-endian:-EB} %{mlittle-endian:-EL}     \
    -maarch64linux%{mabi=ilp32:32}%{mbig-endian:b}"
 
-#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 GNU_USER_TARGET_MATHFILE_SPEC \
   "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"