m68k: Enable LRA by default.

Message ID 20260111161258.3157574-2-mikpelinux@gmail.com
State New
Headers
Series m68k: Enable LRA by default. |

Commit Message

Mikael Pettersson Jan. 11, 2026, 4:12 p.m. UTC
  For now you can still switch to reload with -mno-lra.

Successful bootstrap with c,c++ natively on m68k-linux-gnu.
Test suite results on par with previous non-LRA bootstrap.
A previous version also bootstrapped Ada.

Is this Ok for trunk?

gcc/
	PR target/113939
	* config/m68k/m68k.opt (mlra): Default to LRA instead of reload.
---
 gcc/config/m68k/m68k.opt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Jeffrey Law Jan. 14, 2026, 5:04 a.m. UTC | #1
On 1/11/2026 9:12 AM, Mikael Pettersson wrote:
> For now you can still switch to reload with -mno-lra.
>
> Successful bootstrap with c,c++ natively on m68k-linux-gnu.
> Test suite results on par with previous non-LRA bootstrap.
> A previous version also bootstrapped Ada.
>
> Is this Ok for trunk?
>
> gcc/
> 	PR target/113939
> 	* config/m68k/m68k.opt (mlra): Default to LRA instead of reload.
Failed configuring libgfortran for me.  Unfortunately it's all run out 
of a docker container, so I don't have the actual log files.  So all we 
get out of it is:

> libtool.m4: error: problem compiling FC test program
>

This worked find without the LRA patch.

jeff
  
Mikael Pettersson Jan. 14, 2026, 12:09 p.m. UTC | #2
On Wed, Jan 14, 2026 at 6:04 AM Jeffrey Law
<jeffrey.law@oss.qualcomm.com> wrote:
>
>
>
> On 1/11/2026 9:12 AM, Mikael Pettersson wrote:
>
> For now you can still switch to reload with -mno-lra.
>
> Successful bootstrap with c,c++ natively on m68k-linux-gnu.
> Test suite results on par with previous non-LRA bootstrap.
> A previous version also bootstrapped Ada.
>
> Is this Ok for trunk?
>
> gcc/
> PR target/113939
> * config/m68k/m68k.opt (mlra): Default to LRA instead of reload.
>
> Failed configuring libgfortran for me.  Unfortunately it's all run out of a docker container, so I don't have the actual log files.  So all we get out of it is:
>
> libtool.m4: error: problem compiling FC test program
>
>
>
> This worked find without the LRA patch.

That's probably PR120165. I'll take a look.

(Is there a concept of "primary languages" similar to primary targets?
If so, is Fortran one?)

/Mikael
  
Jeffrey Law Jan. 14, 2026, 2:28 p.m. UTC | #3
On 1/14/2026 5:09 AM, Mikael Pettersson wrote:
> On Wed, Jan 14, 2026 at 6:04 AM Jeffrey Law
> <jeffrey.law@oss.qualcomm.com> wrote:
>>
>>
>> On 1/11/2026 9:12 AM, Mikael Pettersson wrote:
>>
>> For now you can still switch to reload with -mno-lra.
>>
>> Successful bootstrap with c,c++ natively on m68k-linux-gnu.
>> Test suite results on par with previous non-LRA bootstrap.
>> A previous version also bootstrapped Ada.
>>
>> Is this Ok for trunk?
>>
>> gcc/
>> PR target/113939
>> * config/m68k/m68k.opt (mlra): Default to LRA instead of reload.
>>
>> Failed configuring libgfortran for me.  Unfortunately it's all run out of a docker container, so I don't have the actual log files.  So all we get out of it is:
>>
>> libtool.m4: error: problem compiling FC test program
>>
>>
>>
>> This worked find without the LRA patch.
> That's probably PR120165. I'll take a look.
>
> (Is there a concept of "primary languages" similar to primary targets?
> If so, is Fortran one?)
There are such concepts.  But this appears to be broken so badly that I 
can't in good conscience ACK it into the tree.

jeff
  
Richard Biener Jan. 14, 2026, 2:57 p.m. UTC | #4
On Wed, Jan 14, 2026 at 3:29 PM Jeffrey Law
<jeffrey.law@oss.qualcomm.com> wrote:
>
>
>
> On 1/14/2026 5:09 AM, Mikael Pettersson wrote:
> > On Wed, Jan 14, 2026 at 6:04 AM Jeffrey Law
> > <jeffrey.law@oss.qualcomm.com> wrote:
> >>
> >>
> >> On 1/11/2026 9:12 AM, Mikael Pettersson wrote:
> >>
> >> For now you can still switch to reload with -mno-lra.
> >>
> >> Successful bootstrap with c,c++ natively on m68k-linux-gnu.
> >> Test suite results on par with previous non-LRA bootstrap.
> >> A previous version also bootstrapped Ada.
> >>
> >> Is this Ok for trunk?
> >>
> >> gcc/
> >> PR target/113939
> >> * config/m68k/m68k.opt (mlra): Default to LRA instead of reload.
> >>
> >> Failed configuring libgfortran for me.  Unfortunately it's all run out of a docker container, so I don't have the actual log files.  So all we get out of it is:
> >>
> >> libtool.m4: error: problem compiling FC test program
> >>
> >>
> >>
> >> This worked find without the LRA patch.
> > That's probably PR120165. I'll take a look.
> >
> > (Is there a concept of "primary languages" similar to primary targets?
> > If so, is Fortran one?)
> There are such concepts.  But this appears to be broken so badly that I
> can't in good conscience ACK it into the tree.

We in principle agree to wipe reload for GCC 16 but tis did not
materialize (aka nobody
did the work).  For the principle of keeping a port live it would be
fine to break
fortran given you can build a cross with its C runtime and do basic
testing to re-surrect
fortran support from such state.

But no, Fortran isn't a "primary" language and m68k isn't a primary or
secondary target
so primary or secondary (or sth else) status of a language does not
matter here anyway.

Richard.

>
> jeff
  

Patch

diff --git a/gcc/config/m68k/m68k.opt b/gcc/config/m68k/m68k.opt
index a97fac654d8..e9693ff681b 100644
--- a/gcc/config/m68k/m68k.opt
+++ b/gcc/config/m68k/m68k.opt
@@ -147,7 +147,7 @@  Target RejectNegative Mask(LONG_JUMP_TABLE_OFFSETS)
 Use 32-bit offsets in jump tables rather than 16-bit offsets.
 
 mlra
-Target Var(m68k_lra_p) Undocumented
+Target Var(m68k_lra_p) Init(1) Undocumented
 Use LRA for reload instead of the old reload framework.  This option is
 experimental, and it may be removed in future versions of the compiler.