[patch #10500] gcc >=12 no longer supports -mpower10

Tim Haines <[email protected]> Mon, 3 Feb 2025 09:14:49 -0500 (EST)
Newsgroups gmane.comp.sysutils.autoconf.archive-maintainers
Message-ID <[email protected]>
--8323329-346891112-1738592089=:1998547
Content-Type: TEXT/plain; CHARSET=utf-8
Content-Transfer-Encoding: QUOTED-PRINTABLE
Content-Disposition: inline

URL:=0A  <https://savannah.gnu.org/patch/?10500>=0A=0A                 Summ=
ary: gcc >=3D12 no longer supports -mpower10=0A                   Group: GN=
U Autoconf Archive=0A               Submitter: thaines=0A               Sub=
mitted: Mon 03 Feb 2025 02:14:43 PM UTC=0A                Priority: 6=0A   =
               Status: None=0A             Assigned to: None=0A        Orig=
inator Email:=0A             Open/Closed: Open=0A         Discussion Lock: =
Any=0A=0A=0A    _______________________________________________________=0A=
=0AFollow-up Comments:=0A=0A=0A--------------------------------------------=
-----------=0ADate: Mon 03 Feb 2025 02:14:43 PM UTC By: Tim Haines <thaines=
>=0ASupport for -mpower10 was removed from gcc by=0Ahttps://gcc.gnu.org/git=
/gitweb.cgi?p=3Dgcc.git;h=3D4e577910050d in 2020.=0A=0AMy proposed fix is b=
elow, but I don't like it because=0A=0A1) the clang check is redundant with=
 the check below in AX_CHECK_COMPILE_FLAG=0A=0A2) It doesn't check the vers=
ion of gcc=0A=0ASuggestions are very welcome.=0A=0A=0Adiff --git a/m4/ax_gc=
c_archflag.m4 b/m4/ax_gcc_archflag.m4=0Aindex c52b9b2..fb3c2b5 100644=0A---=
 a/m4/ax_gcc_archflag.m4=0A+++ b/m4/ax_gcc_archflag.m4=0A@@ -240,7 +240,14 =
@@ if test "x[]m4_default([$1],yes)" =3D xyes; then # if we=0Arequire porta=
ble code=0A   # x86.  And some other arches (e.g. Alpha) don't accept -mtun=
e.  Grrr.=0A   case $host_cpu in i*86|x86_64*|amd64*) flag_prefixes=3D"$fla=
g_prefixes -mcpu=3D=0A-m";; esac=0A else=0A-  flag_prefixes=3D"-march=3D -m=
cpu=3D -m"=0A+  if "x$ax_gcc_arch" =3D xpower10; then=0A+    if test "x$ax_=
cv_[]_AC_LANG_ABBREV[]_compiler_vendor" !=3D xclang; then=0A+      # gcc 12=
.0 dropped support for -mpower10=0A+      flag_prefixes=3D"-mcpu=3D"=0A+   =
 fi=0A+  else=0A+    flag_prefixes=3D"-march=3D -mcpu=3D -m"=0A+  fi=0A fi=
=0A for flag_prefix in $flag_prefixes; do=0A   for arch in $ax_gcc_arch; do=
=0A=0A=0A=0A=0A=0A=0A=0A=0A=0A    _________________________________________=
______________=0A=0AReply to this item at:=0A=0A  <https://savannah.gnu.org=
/patch/?10500>=0A=0A_______________________________________________=0AMessa=
ge sent via Savannah=0Ahttps://savannah.gnu.org/=0A
--8323329-346891112-1738592089=:1998547
Content-Type: APPLICATION/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZ6DPWQAKCRCqLAuaBUf3
TkedAQDpNIjEf9Or4SBvEfX1/FASdlPoecKz8vkb+mcLk4+WaAEAyur+ybLGl2BN
R54HG5AQYCfnSGx7UMN7eOrzC2o+9g8=
=Lm84
-----END PGP SIGNATURE-----

--8323329-346891112-1738592089=:1998547--