]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
s390: Deprecate -m31
authorStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Mon, 19 Jan 2026 08:56:51 +0000 (09:56 +0100)
committerStefan Schulze Frielinghaus <stefansf@gcc.gnu.org>
Mon, 19 Jan 2026 08:56:51 +0000 (09:56 +0100)
Support for -m31 is deprecated and will be removed in a future release.

In order to let users know, emit an error/warning during configure.  An
error is thrown if --enable-multilib is given implicitly, or if
explicitly but not --enable-obsolete.

ChangeLog:

* configure: Regenerate.
* configure.ac: Deprecate -m31.

gcc/ChangeLog:

* config.gcc: Deprecate -m31.
* doc/invoke.texi: Deprecate -m31.

configure
configure.ac
gcc/config.gcc
gcc/doc/invoke.texi

index bb0905df77fad3fbfd79b5de9c69adf83c00c0ae..576e25348315521788487d1779f56e9049020428 100755 (executable)
--- a/configure
+++ b/configure
@@ -11755,6 +11755,22 @@ case "$target:$have_compiler:$host:$target:$enable_multilib" in
     ;;
 esac
 
+# For s390, -m31 is deprecated.  Emit a warning if --enable-multilib and
+# --enable-obsolete are explicitly specified.  If --enable-multilib is
+# specified implicitly or --enable-obsolete is missing, error out.
+case "$target:$enable_multilib:$enable_obsolete" in
+  s390*:yes:yes)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Support for -m31 is deprecated and will be removed." >&5
+$as_echo "$as_me: WARNING: Support for -m31 is deprecated and will be removed." >&2;}
+    ;;
+  s390*::*)
+    as_fn_error $? "Support for -m31 is deprecated and will be removed. Explicitly specify --disable-multilib or --enable-multilib --enable-obsolete to build it anyway." "$LINENO" 5
+    ;;
+  s390*:yes:*)
+    as_fn_error $? "Support for -m31 is deprecated and will be removed. Specify --enable-obsolete to build it anyway." "$LINENO" 5
+    ;;
+esac
+
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
   target_configargs="--enable-multilib ${target_configargs}"
index 5b87025677176afd1230be2e6c931c086433810c..31ad7cd04e1fd0fdc88f5e943e424a386395dc27 100644 (file)
@@ -3825,6 +3825,21 @@ case "$target:$have_compiler:$host:$target:$enable_multilib" in
     ;;
 esac
 
+# For s390, -m31 is deprecated.  Emit a warning if --enable-multilib and
+# --enable-obsolete are explicitly specified.  If --enable-multilib is
+# specified implicitly or --enable-obsolete is missing, error out.
+case "$target:$enable_multilib:$enable_obsolete" in
+  s390*:yes:yes)
+    AC_MSG_WARN([Support for -m31 is deprecated and will be removed.])
+    ;;
+  s390*::*)
+    AC_MSG_ERROR([Support for -m31 is deprecated and will be removed. Explicitly specify --disable-multilib or --enable-multilib --enable-obsolete to build it anyway.])
+    ;;
+  s390*:yes:*)
+    AC_MSG_ERROR([Support for -m31 is deprecated and will be removed. Specify --enable-obsolete to build it anyway.])
+    ;;
+esac
+
 # Default to --enable-multilib.
 if test x${enable_multilib} = x ; then
   target_configargs="--enable-multilib ${target_configargs}"
index b671e11960be1ef634449947900b6c5d1c598e91..14b1e9b87e36d46a28ad523d75dc0a1b434c5373 100644 (file)
@@ -292,6 +292,15 @@ case ${target} in
     fi;;
 esac
 
+case ${target} in
+  s390-*)
+    if test "x$enable_obsolete" != xyes; then
+      echo "*** Configuration ${target} is deprecated and will be removed." >&2
+      echo "*** Specify --enable-obsolete to build it anyway." >&2
+      exit 1
+    fi;;
+esac
+
 # Unsupported targets list.  Do not put an entry in this list unless
 # it would otherwise be caught by a more permissive pattern.  The list
 # should be in alphabetical order.
index 9420462538f7024d502c89daa4b5aaa1447aaab8..39c7aee99d780f3e0954e7cc11265379fc76fedf 100644 (file)
@@ -34172,7 +34172,8 @@ GNU/Linux for S/390 ABI@.  When @option{-m64} is specified, generate
 code compliant to the GNU/Linux for zSeries ABI@.  This allows GCC in
 particular to generate 64-bit instructions.  For the @samp{s390}
 targets, the default is @option{-m31}, while the @samp{s390x}
-targets default to @option{-m64}.
+targets default to @option{-m64}.  Note, @option{-m31} is deprecated and
+support will be removed.
 
 @opindex mzarch
 @opindex mesa