public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114910] New: can't build a c6x cross compiler
@ 2024-05-01 16:24 dkm at gcc dot gnu.org
2024-05-01 17:04 ` [Bug target/114910] " pinskia at gcc dot gnu.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: dkm at gcc dot gnu.org @ 2024-05-01 16:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
Bug ID: 114910
Summary: can't build a c6x cross compiler
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: dkm at gcc dot gnu.org
Target Milestone: ---
Hello,
I'm building a c6x cross compiler using crosstool-ng (with newlib).
Configured with:
configure --build=x86_64-build_pc-linux-gnu --host=x86_64-build_pc-linux-gnu
--target=tic6x-elf --prefix=/root/crosstool-scratch/tic6x-elf
--exec_prefix=/root/crosstool-scratch/tic6x-elf
--with-local-prefix=/root/crosstool-scratch/tic6x-elf/tic6x-elf
--with-headers=/root/crosstool-scratch/tic6x-elf/tic6x-elf/include
--with-newlib --enable-threads=no --disable-shared
--with-pkgversion=crosstool-NG 1.26.0.72_810021d --enable-__cxa_atexit
--disable-libgomp --disable-libmudflap --disable-libmpx --disable-libssp
--disable-libquadmath --disable-libquadmath-support
--with-gmp=/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/buildtools
--with-mpfr=/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/buildtools
--with-mpc=/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/buildtools
--with-isl=/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/buildtools --enable-lto
--enable-target-optspace --disable-nls --enable-multiarch
--enable-languages=c,c++
The failing command:
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/build/build-cc-gcc-final/./gcc/xgcc
-B/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/build/build-cc-gcc-final/./gcc/
-B/root/crosstool-scratch/tic6x-elf/tic6x-elf/bin/
-B/root/crosstool-scratch/tic6x-elf/tic6x-elf/lib/ -isystem
/root/crosstool-scratch/tic6x-elf/tic6x-elf/include -isystem
/root/crosstool-scratch/tic6x-elf/tic6x-elf/sys-include -g -O2 -idirafter
/root/crosstool-scratch/tic6x-elf/tic6x-elf/include -g -Os -mbig-endian -O2 -g
-O2 -idirafter /root/crosstool-scratch/tic6x-elf/tic6x-elf/include -g -Os
-DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition
-isystem ./include -msdata=none -g -DIN_LIBGCC2 -fbuilding-libgcc
-fno-stack-protector -msdata=none -I. -I. -I../../.././gcc
-I/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc
-I/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/.
-I/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/../gcc
-I/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/../include
-DHAVE_CC_TLS -DUSE_EMUTLS -o hardcfr.o -MT hardcfr.o -MD -MP -MF hardcfr.dep
-c /mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c
-fvisibility=hidden -DHIDE_EXPORTS -save-temps --verbose-asm
hardcfr.s: Assembler messages:
hardcfr.s:164: Error: label not at start of execute packet
hardcfr.s:335: Error: label not at start of execute packet
hardcfr.s:340: Error: label not at start of execute packet
hardcfr.s:357: Error: label not at start of execute packet
hardcfr.s:381: Error: label not at start of execute packet
with corresponding assembly:
161 │ .loc 1 165 3 is_stmt 0
162 │ callp .s2 (consume_seq), B3 ;#
163 │ .LVL9:
164 │ || stw .d1t1 A7, *A4 ;# cfg_it__lsm.31, *cfg_it_8(D)
165 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:167:
return true;
166 │ .loc 1 167 9
335 │ || add .l1x 12, B15, A4 ;#,,
336 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:287:
consume_seq (&cfg_it);
337 │ .loc 1 287 4
338 │ callp .s2 (consume_seq), B3 ;#
339 │ .LVL15:
340 │ || add .l1x 12, B15, A4 ;#,,
341 │ .L14:
342 │ .LBE66:
343 │ .loc 1 274 35 is_stmt 1 discriminator 2
344 │ .LVL16:
345 │ b .s1 .L12 ;#
346 │ || add .d1 A10, 1, A10 ;# i,, i
347 │ nop 5 ;#
348 │ ;; jump to .L12 occurs ;#
349 │ .LVL17:
350 │ .L13:
351 │ .LBB67:
352 │ .loc 1 292 4
353 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:292: if
(!check_seq (visited, &cfg_it))
354 │ .loc 1 292 9 is_stmt 0
355 │ callp .s2 (check_seq), B3 ;#
356 │ .LVL18:
357 │ || add .l2 12, B15, B4 ;#,,
358 │ || mv .d1 A15, A4 ;# visited,
359 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:292: if
(!check_seq (visited, &cfg_it))
360 │ .loc 1 292 7 discriminator 1
361 │ extu .s1 A4, 24, 24, A0 ;# tmp129, _1
362 │ [A0] b .s1 .L15 ;#
363 │ nop 5 ;#
364 │ ;; condjump to .L15 occurs ;#
365 │ .LVL19:
366 │ .L16:
367 │ .loc 1 293 6 is_stmt 1
368 │ .LBB64:
369 │ .LBB65:
370 │ .loc 1 262 3
371 │ callp .s2 (abort), B3 ;#
372 │ .LVL20:
373 │ .L15:
374 │ .LBE65:
375 │ .LBE64:
376 │ .loc 1 296 4
377 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:296: if
(!check_seq (visited, &cfg_it))
378 │ .loc 1 296 9 is_stmt 0
379 │ callp .s2 (check_seq), B3 ;#
380 │ .LVL21:
381 │ || add .l2 12, B15, B4 ;#,,
382 │ || mv .d1 A15, A4 ;# visited,
383 │ ;#
/mnt/dkm/git/crosstool-ng/.build/tic6x-elf/src/gcc/libgcc/hardcfr.c:296: if
(!check_seq (visited, &cfg_it))
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
@ 2024-05-01 17:04 ` pinskia at gcc dot gnu.org
2024-05-01 22:46 ` pinskia at gcc dot gnu.org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-01 17:04 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The only thing hardcfr.c uses special is __builtin_return_address and
__builtin_trap otherwise it is just normal C code ...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
2024-05-01 17:04 ` [Bug target/114910] " pinskia at gcc dot gnu.org
@ 2024-05-01 22:46 ` pinskia at gcc dot gnu.org
2024-05-01 22:51 ` pinskia at gcc dot gnu.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-01 22:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
C6x Linux support was removed in 2021:
https://lore.kernel.org/linux-arm-kernel/20210120124812.2800027-1-arnd@kernel.org/T/
So maybe it is time to remove it from GCC too.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
2024-05-01 17:04 ` [Bug target/114910] " pinskia at gcc dot gnu.org
2024-05-01 22:46 ` pinskia at gcc dot gnu.org
@ 2024-05-01 22:51 ` pinskia at gcc dot gnu.org
2024-05-02 7:19 ` dkm at gcc dot gnu.org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-01 22:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
LVL labels comes from the debugging info when it comes to variable tracking.
This looks like it has always been broken ...
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (2 preceding siblings ...)
2024-05-01 22:51 ` pinskia at gcc dot gnu.org
@ 2024-05-02 7:19 ` dkm at gcc dot gnu.org
2024-05-02 13:22 ` mikpelinux at gmail dot com
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dkm at gcc dot gnu.org @ 2024-05-02 7:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #4 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
Oh, so maybe I could use `-fno-var-tracking` to workaround the failure... I'll
try that, thanks.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (3 preceding siblings ...)
2024-05-02 7:19 ` dkm at gcc dot gnu.org
@ 2024-05-02 13:22 ` mikpelinux at gmail dot com
2024-05-02 17:00 ` dkm at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: mikpelinux at gmail dot com @ 2024-05-02 13:22 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #5 from Mikael Pettersson <mikpelinux at gmail dot com> ---
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.)
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (4 preceding siblings ...)
2024-05-02 13:22 ` mikpelinux at gmail dot com
@ 2024-05-02 17:00 ` dkm at gcc dot gnu.org
2024-05-02 23:52 ` mikpelinux at gmail dot com
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: dkm at gcc dot gnu.org @ 2024-05-02 17:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #6 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
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?
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (5 preceding siblings ...)
2024-05-02 17:00 ` dkm at gcc dot gnu.org
@ 2024-05-02 23:52 ` mikpelinux at gmail dot com
2024-05-03 11:12 ` mikpelinux at gmail dot com
2024-05-03 11:53 ` dkm at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mikpelinux at gmail dot com @ 2024-05-02 23:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
Mikael Pettersson <mikpelinux at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mikpelinux at gmail dot com
--- Comment #7 from Mikael Pettersson <mikpelinux at gmail dot com> ---
(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.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (6 preceding siblings ...)
2024-05-02 23:52 ` mikpelinux at gmail dot com
@ 2024-05-03 11:12 ` mikpelinux at gmail dot com
2024-05-03 11:53 ` dkm at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: mikpelinux at gmail dot com @ 2024-05-03 11:12 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #8 from Mikael Pettersson <mikpelinux at gmail dot com> ---
According to my git bisect, the assembler error started with
551935d11817dd5b139d66c36f62c0f0eba0db06 is the first new commit
commit 551935d11817dd5b139d66c36f62c0f0eba0db06
Author: Alexandre Oliva <oliva@adacore.com>
Date: Fri Oct 20 07:50:33 2023 -0300
Control flow redundancy hardening
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/114910] can't build a c6x cross compiler
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
` (7 preceding siblings ...)
2024-05-03 11:12 ` mikpelinux at gmail dot com
@ 2024-05-03 11:53 ` dkm at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: dkm at gcc dot gnu.org @ 2024-05-03 11:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114910
--- Comment #9 from Marc Poulhiès <dkm at gcc dot gnu.org> ---
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 ?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-05-03 11:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-01 16:24 [Bug target/114910] New: can't build a c6x cross compiler dkm at gcc dot gnu.org
2024-05-01 17:04 ` [Bug target/114910] " pinskia at gcc dot gnu.org
2024-05-01 22:46 ` pinskia at gcc dot gnu.org
2024-05-01 22:51 ` pinskia at gcc dot gnu.org
2024-05-02 7:19 ` dkm at gcc dot gnu.org
2024-05-02 13:22 ` mikpelinux at gmail dot com
2024-05-02 17:00 ` dkm at gcc dot gnu.org
2024-05-02 23:52 ` mikpelinux at gmail dot com
2024-05-03 11:12 ` mikpelinux at gmail dot com
2024-05-03 11:53 ` dkm at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).