Opened 2 years ago

Closed 2 years ago

#16519 closed enhancement (fixed)

gcc-12.1.0

Reported by: Xi Ruoyao Owned by: pierre
Priority: normal Milestone: 11.2
Component: BOOK Version: git
Severity: normal Keywords:
Cc:

Description

LFS ticket: https://wiki.linuxfromscratch.org/lfs/ticket/5058

I'll not take this one for now because I don't really use fortran/objc/etc. But if other editors are busy I can take it later after finish LFS and verify my build with make check.

Note that we may have to drop D: https://gcc.gnu.org/r12-5686.

Change History (11)

comment:1 by pierre, 2 years ago

Owner: changed from blfs-book to pierre
Status: newassigned

comment:2 by pierre, 2 years ago

LFS updated

comment:3 by pierre, 2 years ago

Should we tell how to download a D compiler binary?

comment:4 by pierre, 2 years ago

Summary: gcc-12.1.0 (wait for LFS)gcc-12.1.0

comment:5 by pierre, 2 years ago

See https://gcc.gnu.org/gcc-12/changes.html

Excerpt: "An ABI incompatibility between C and C++ when passing or returning by value certain aggregates containing zero width bit-fields has been discovered on various targets. As mentioned in PR102024, since the PR42217 fix in GCC 4.5 the C++ front-end has been removing zero width bit-fields from the internal representation of the aggregates after the layout of those aggregates, but the C front-end kept them, so passing e.g. struct S { float a; int : 0; float b; } or struct T { float c; int : 0; } by value could differ between C and C++. Starting with GCC 12 the C++ front-end no longer removes those bit-fields from the internal representation and per clarified psABI some targets have been changed, so that they either ignore those bit-fields in the argument passing by value decisions in both C and C++, or they always take them into account. x86-64, ARM and AArch64 will always ignore them (so there is a C ABI incompatibility between GCC 11 and earlier with GCC 12 or later), PowerPC64 ELFv2 and S/390 always take them into account (so there is a C++ ABI incompatibility, GCC 4.4 and earlier compatible with GCC 12 or later, incompatible with GCC 4.5 through GCC 11). RISC-V has changed the handling of these already starting with GCC 10. As the ABI requires, MIPS takes them into account handling function return values so there is a C++ ABI incompatibility with GCC 4.5 through 11. For function arguments on MIPS, refer to the MIPS specific entry. GCC 12 on the above targets will report such incompatibilities as warnings or other diagnostics unless -Wno-psabi is used."

IIUC, it means that if some package in LFS/BLFS uses a C ABI with zero-width bit-fields in a struct, it should trigger the incompatibility if a user of the package is compiled with GCC-<12 and the package with GCC-12 (or the converse). That may not be frequent, but let's try to keep this in mind...

Last edited 2 years ago by pierre (previous) (diff)

in reply to:  5 comment:6 by Xi Ruoyao, 2 years ago

Replying to pierre:

IIUC, it means that if some package in LFS/BLFS uses a C ABI with zero-width bit-fields in a struct, it should trigger the incompatibility if a user of the package is compiled with GCC-<12 and the package with GCC-12 (or the converse). That may not be frequent, but let's try to keep this in mind...

The usage of zero-width bit-fields are very rare. I searched for these bit-fields in /usr/include and there is nothing. My LFS log contains no -Wpsabi informs.

in reply to:  3 ; comment:7 by Xi Ruoyao, 2 years ago

Replying to pierre:

Should we tell how to download a D compiler binary?

Is there an editor really programming in D? I can't even write "hello world" in D.

in reply to:  7 ; comment:8 by pierre, 2 years ago

Replying to Xi Ruoyao:

Replying to pierre:

Should we tell how to download a D compiler binary?

Is there an editor really programming in D? I can't even write "hello world" in D.

I think Thomas (Moody) used D to program the "Sploosh" robot for #lfs-support. He also likes pascal. But I plan to just tell that there are two other languages (ADA and D) that need a binary to be bootstrapped.

in reply to:  8 ; comment:9 by Bruce Dubbs, 2 years ago

Is there an editor really programming in D? I can't even write "hello world" in D.

I plan to just tell that there are two other languages (ADA and D) that need a binary to be bootstrapped.

That sounds like the right approach to me. We can always revisit later if necessary.

in reply to:  9 comment:10 by Xi Ruoyao, 2 years ago

Replying to Bruce Dubbs:

Is there an editor really programming in D? I can't even write "hello world" in D.

I plan to just tell that there are two other languages (ADA and D) that need a binary to be bootstrapped.

That sounds like the right approach to me. We can always revisit later if necessary.

I remember we once had instruction for Ada (and Java, which has been removed from GCC) in BLFS.

comment:11 by pierre, 2 years ago

Resolution: fixed
Status: assignedclosed

a0ed916d8c update to mutter-42.1
6bbb079840 Update to gnome-shell-extensions-42.1
681bdef0fd Update to gnome-shell-42.1
6715f575c0 Update to sqlite-3.38.5
e28b6fcf08 Update to git-2.36.1
7354b9a184 Update to gcc-12.1.0

Note: See TracTickets for help on using tickets.