Re: Bug#1107416: gcc-14: Please build with -fno-fold-mem-offsets on m68k
Hi,
On Sat, 2025-06-07 at 13:32 +0200, John Paul Adrian Glaubitz wrote:
> The gcc maintainer will certainly know better whether all of these are
> needed to fix the build and consequently avoid other packages from being
> miscompiled or failing to build.
I was not able to tune gcc-14 properly using CFLAGS to apply this workaround
when using gcc-13 as the bootstrap compiler but the attached patch worked for
me which of course can't be used in the actual package.
It should be possible to add -fno-fold-mem-offsets to DRIVER_SELF_SPECS on
m68k. However, I currently don't understand how the syntax works. I'll
ask the Gentoo people who have done this.
Adrian
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer
`. `' Physicist
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
From 6a616afb8dadcd33506001914f5ca6fa37749b6b Mon Sep 17 00:00:00 2001
From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Date: Sun, 8 Jun 2025 07:59:26 +0200
Subject: [PATCH] Disable fold-mem-offsets
---
gcc/common.opt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/common.opt b/gcc/common.opt
index 0e50305dde8..e57dff18af7 100644
--- a/src/gcc/common.opt
+++ b/src/gcc/common.opt
@@ -1295,7 +1295,7 @@ Common Var(flag_cprop_registers) Optimization
Perform a register copy-propagation optimization pass.
ffold-mem-offsets
-Common Var(flag_fold_mem_offsets) Init(1) Optimization
+Common Var(flag_fold_mem_offsets) Init(0) Optimization
Fold instructions calculating memory offsets to the memory access instruction if possible.
fcrossjumping
--
2.49.0
Reply to: