patchGNU Autoconf Archive - Patches: patch #10500, gcc >=12 no longer supports...

 
 

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

Submitter:  Tim Haines <thaines>
Submitted:  Mon 03 Feb 2025 02:14:43 PM UTC
   
 
Priority:  6 Status:  None
Assigned to:  None Open/Closed:  Open
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Mon 03 Feb 2025 02:14:43 PM UTC, original submission:  

Support for -mpower10 was removed from gcc by
https://gcc.gnu.o ... it;h=4e577910050d in 2020.

My proposed fix is below, but I don't like it because

1) the clang check is redundant with the check below in AX_CHECK_COMPILE_FLAG

2) It doesn't check the version of gcc

Suggestions are very welcome.


diff --git a/m4/ax_gcc_archflag.m4 b/m4/ax_gcc_archflag.m4
index c52b9b2..fb3c2b5 100644
--- a/m4/ax_gcc_archflag.m4
+++ b/m4/ax_gcc_archflag.m4
@@ -240,7 +240,14 @@ if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
   # x86.  And some other arches (e.g. Alpha) don't accept -mtune.  Grrr.
   case $host_cpu in i*86|x86_64*|amd64*) flag_prefixes="$flag_prefixes -mcpu= -m";; esac
 else
-  flag_prefixes="-march= -mcpu= -m"
+  if "x$ax_gcc_arch" = xpower10; then
+    if test "x$ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor" != xclang; then
+      # gcc 12.0 dropped support for -mpower10
+      flag_prefixes="-mcpu="
+    fi
+  else
+    flag_prefixes="-march= -mcpu= -m"
+  fi
 fi
 for flag_prefix in $flag_prefixes; do
   for arch in $ax_gcc_arch; do


Tim Haines <thaines>

 

Attached Files

This item currently has no attached files.

(Note: upload size limit is set to 4.0MiB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by thaines (Submitted the item)
  •  

    History

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.16-ed84.
    Corresponding source code