packages/gcc/hotfix-g5-power4.patch
2024-04-08 12:53:16 +02:00

31 lines
1.4 KiB
Diff

# --- T2-COPYRIGHT-NOTE-BEGIN ---
# T2 SDE: package/*/gcc/hotfix-g5-power4.patch
# Copyright (C) 2020 - 2022 The T2 SDE Project
#
# This Copyright note is generated by scripts/Create-CopyPatch,
# more information can be found in the files COPYING and README.
#
# This patch file is dual-licensed. It is available under the license the
# patched project is licensed under, as long as it is an OpenSource license
# as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
# of the GNU General Public License version 2 as used by the T2 SDE.
# --- T2-COPYRIGHT-NOTE-END ---
Glibc uses .machine to determine assembly optimizations to use, and G5 as well
as cell, and even power4 -maltivec resulted in power7. Mask _ALTIVEC away
as the .machine selection already did for GFX and GPOPT.
Signed-of-by: René Rebe <rene@exactcode.de>
--- gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc.vanilla 2021-04-25 22:57:16.964223106 +0200
+++ gcc-11.1.0-RC-20210423/gcc/config/rs6000/rs6000.cc 2021-04-25 22:57:27.193223841 +0200
@@ -5765,7 +5765,7 @@
HOST_WIDE_INT flags = rs6000_isa_flags;
/* Disable the flags that should never influence the .machine selection. */
- flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ISEL);
+ flags &= ~(OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT | OPTION_MASK_ALTIVEC | OPTION_MASK_ISEL);
if ((flags & (ISA_3_1_MASKS_SERVER & ~ISA_3_0_MASKS_SERVER)) != 0)
return "power10";