From: Stefan Schulze Frielinghaus <[email protected]>
Since stage 4 draws ever closer I'm posting this already. However,
I'm not pushing this since it would break bootstrap. PR 122794 is
basically fixed, I'm just awaiting green light. However, in the
meantime another build problem showed up. This time while building
libstdc++:
cc1plus: warning: '-m31' is deprecated and support will be removed; use '-m64'
instead [-Wdeprecated]
/gcc/src/libstdc++-v3/src/c++98/compatibility.cc:392:4: error: 'void
{anonymous}::_Y_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEl(...)' aliased
to undefined symbol '_ZNSt13basic_istreamIwSt11char_traitsIwEE8ignoreXXEl'
392 | _Y##name(...) \
| ^~
/gcc/src/libstdc++-v3/src/c++98/compatibility.cc:403:31: note: in expansion of
macro '_GLIBCXX_3_4_5_SYMVER'
403 | #define _GLIBCXX_APPLY_SYMVER _GLIBCXX_3_4_5_SYMVER
| ^~~~~~~~~~~~~~~~~~~~~
...
Without this patch, the build succeeds.
Anyhow, in order to give users a chance to disable the warning, I went
for -Wno-deprecated.
Starting with Linux 6.19, compat syscalls will be removed. Furthermore,
the next glibc release deprecates -m31 support. Therefore, the current
plan for GCC is to also deprecate -m31 and emit a warning for GCC 16 and
remove -m31 entirely for GCC 17.
Any objections to this approach?
-- >8 --
Support for -m31 is deprecated and support will be removed.
---
gcc/config/s390/s390.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/config/s390/s390.cc b/gcc/config/s390/s390.cc
index 28a025be4e8..eba5a4ee6b6 100644
--- a/gcc/config/s390/s390.cc
+++ b/gcc/config/s390/s390.cc
@@ -16711,6 +16711,10 @@ s390_option_override_internal (struct gcc_options
*opts,
}
#endif
+ if (!TARGET_64BIT)
+ warning (OPT_Wdeprecated,
+ "%<-m31%> is deprecated and support will be removed; use %<-m64%>
instead");
+
#ifdef TARGET_DEFAULT_LONG_DOUBLE_128
if (!TARGET_LONG_DOUBLE_128_P (opts_set->x_target_flags))
opts->x_target_flags |= MASK_LONG_DOUBLE_128;
--
2.49.0