[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-30 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #6 from Iain Sandoe  ---
(In reply to Richard Biener from comment #5)
> Does it work when you use STAGE1_CFLAGS="-O0" (I think clang defaults to
> optimizing?).  To rule out compare-debug issues also try
> --without-build-config

The reason for the fail is that the assembler (clang -cc1as) is assembling
branch instructions with differing lengths between the debug and non-debug
cases.

The code is not actually wrong in either case - it simply looks like branch
relaxation has been enabled in one case and not the other.

However this is not in response to changed command line options (so it is an
internal decision in the assembler, probably as a result of detecting either
.loc directives or presence/absence of L local labels between branch and
its destination.).

I am discussing with OSS folks at Apple whether this is an intentional change
(i.e to produce better optimised code) or an accidental one.

Short-term workarounds:

1. (re-)install xcode 12.4 command line tools and select them for use
2. disable debug comparison in the bootstrap ( --without-build-config )

[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-30 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

Richard Biener  changed:

   What|Removed |Added

 Target||x86_64-apple-darwin
   Host||x86_64-apple-darwin

--- Comment #5 from Richard Biener  ---
Does it work when you use STAGE1_CFLAGS="-O0" (I think clang defaults to
optimizing?).  To rule out compare-debug issues also try --without-build-config

[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-29 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #4 from Jürgen Reuter  ---
(In reply to Dominique d'Humieres from comment #3)
> Confirmed.

Merci, Dominique. Would you actually advise to compile without bootstrap and
start using gcc, or wait until the reason for the bootstrap failure is
understood and hopefully fixed?

[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-29 Thread dominiq at lps dot ens.fr via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

Dominique d'Humieres  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1
   Last reconfirmed||2021-04-29
 CC||iains at gcc dot gnu.org

--- Comment #3 from Dominique d'Humieres  ---
Confirmed.

[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-29 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #2 from Jürgen Reuter  ---
I just check, with --disable-bootstrap, gcc compiles to the end. Just the
checksums of the object files for bootstrap between stage 2 and 3 don't agree.

[Bug bootstrap/100340] Bootstrap fails with Clang 12.0.5 (XCode 12.5)

2021-04-29 Thread juergen.reuter at desy dot de via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100340

--- Comment #1 from Jürgen Reuter  ---
After update to macOS Big Sur 11.3 with XCode 12.5 and Apple Clang
clang-1205.0.22.9, bootstrap doesn't work any more:
Comparing stages 2 and 3
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1objplus-checksum.o differs
Bootstrap comparison failure!
gcc/tree-ssa-operands.o differs
gcc/tree-ssanames.o differs
[...]
lib/libz_a-deflate.o differs
zlib/libz_a-gzread.o differs
zlib/libz_a-inflate.o differs
zlib/libz_a-crc32.o differs
zlib/libz_a-inftrees.o differs