[Bug target/114910] can't build a c6x cross compiler

2024-05-03 Thread dkm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #9 from Marc Poulhiès  ---
Yes, sorry I should have added that in my original message (I did mention the
commit on IRC). This is the commit that introduces the hardcfr.c file that is
miscompiled. The error may be latent and bisecting should probably run the
above command with a copy of a preprocessed hardcfr.c ?

[Bug target/114910] can't build a c6x cross compiler

2024-05-03 Thread mikpelinux at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #8 from Mikael Pettersson  ---
According to my git bisect, the assembler error started with

551935d11817dd5b139d66c36f62c0f0eba0db06 is the first new commit
commit 551935d11817dd5b139d66c36f62c0f0eba0db06
Author: Alexandre Oliva 
Date:   Fri Oct 20 07:50:33 2023 -0300

Control flow redundancy hardening

[Bug target/114910] can't build a c6x cross compiler

2024-05-02 Thread mikpelinux at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

Mikael Pettersson  changed:

   What|Removed |Added

 CC||mikpelinux at gmail dot com

--- Comment #7 from Mikael Pettersson  ---
(In reply to Marc Poulhiès from comment #6)
> It fails with -Os.
> It works with -O0, -O1, -O2, -O3 and -Os -fno-var-tracking.
> 
> Mikael, is it possible that you're not using -Os for target libs?

I'm not adding -Os anywhere, just taking defaults.
Confirmed that adding --enable-target-optspace triggers the assembler error.

[Bug target/114910] can't build a c6x cross compiler

2024-05-02 Thread dkm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #6 from Marc Poulhiès  ---
It fails with -Os.
It works with -O0, -O1, -O2, -O3 and -Os -fno-var-tracking.

Mikael, is it possible that you're not using -Os for target libs?

[Bug target/114910] can't build a c6x cross compiler

2024-05-02 Thread mikpelinux at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #5 from Mikael Pettersson  ---
I don't use crosstool-ng, but I have no problems building a cross to
c6x-unknown-elf with binutils-2.42, gcc-14.1.0-RC-20240430, and
newlib-4.4.0.20231231. (A cross to c6x-unknown-uclibc with uclibc-ng-1.0.47
experiences some problems not seen with gcc-13.2.0, but those are
compiler-warnings-that-now-are-errors rather than the assembler errors you
cited.)

[Bug target/114910] can't build a c6x cross compiler

2024-05-02 Thread dkm at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #4 from Marc Poulhiès  ---
Oh, so maybe I could use `-fno-var-tracking` to workaround the failure... I'll
try that, thanks.

[Bug target/114910] can't build a c6x cross compiler

2024-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #3 from Andrew Pinski  ---
LVL labels comes from the debugging info when it comes to variable tracking.

This looks like it has always been broken ...

[Bug target/114910] can't build a c6x cross compiler

2024-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #2 from Andrew Pinski  ---
C6x Linux support was removed in 2021:
https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-a...@kernel.org/T/

So maybe it is time to remove it from GCC too.

[Bug target/114910] can't build a c6x cross compiler

2024-05-01 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910

--- Comment #1 from Andrew Pinski  ---
The only thing hardcfr.c uses special is __builtin_return_address and
__builtin_trap otherwise it is just normal C code ...