[Bug ld/29226] New: gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: jason.vas.dias at gmail dot com Target Milestone: --- When building the Fedora 37 'gcc-12.1.1.1-fc37.src.rpm' on a Ro

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #1 from Jason Vas Dias --- Also, doing this, as root, solves the problem: $ cd /usr/local/bin $ mv ld not-ld $ ln -s /opt/rh/gcc-toolset-11/root/usr/bin/ld ld So this is why I raised the bug against binutils 2.38 in the firs

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #2 from Jason Vas Dias --- Does NOT happen when option is changed from '-fcf-protection' to '-fcf-protection=check' - '-fcf-protection=branch' and '-fcf-protection=full' also trigger the bug. So I COULD make GCC use this option

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #3 from Jason Vas Dias --- OK, as root, if I install the binutils-local-debuginfo and binutils-local-gold debuginfo RPMs, I can do : $ cd /usr/local/bin $ mv ld ld.bin $ echo '#!/bin/bash /usr/bin/gdb -q --batch-silent -ex 'se

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #4 from Jason Vas Dias --- Oops, had not finished editing last line of previous comment: gold/x86_64.c, line 6113 will become: object->error(_("failed to match split-stack sequence at " "section %u offset %0

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #5 from Jason Vas Dias --- OK, with binutils 's gold/ld-new and libbfd recompiled with the above error statement in gold/x86_64.cc, we get: /usr/local/bin/ld: Unlocking file "/home/jvd/rpmbuild/BUILD/gcc-12.1.1-20220507/obj-x86_64

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #6 from Jason Vas Dias --- OK, now the error message printing code looks like this: { if (!object->has_no_split_stack()) { unsigned char ib[16]={0}; if ( view ) { ib[0] = *(((unsigned char*)view) +

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #7 from Jason Vas Dias --- Aha! Am I right in thinking 'f3.0f.1e.fa' (hex byte string) specifies x86_64 instruction 'RDSSPD/RDSSPQ' ? I think so ! : >From Intel Software Developer's Manual (SDM), Book 2, Instructions, Chapter 3

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #8 from Jason Vas Dias --- So my best guess at a patch would currently be: $ diff -U1 x86_64.cc~ x86_64.cc --- x86_64.cc~ 2022-01-22 12:14:09.0 + +++ x86_64.cc 2022-06-05 17:34:26.400079527 +0100 @@ -6050,2 +6050,

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #9 from Jason Vas Dias --- Oops, a better patch is given by : $ gendiff gold \~ --- BEGIN PATCH diff -up gold/i386.cc~ gold/i386.cc --- gold/i386.cc~ 2022-06-05 02:23:38.826984954 +0100 +++ gold/i386.cc2022-06-05 17:

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #10 from Jason Vas Dias --- OK, I am now running the full binutils test suite with the above patch applied, which DOES at least make the gcc build now work OK. -- You are receiving this mail because: You are on the CC list for th

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #11 from Jason Vas Dias --- Hmm, close but no cigar - the test suite now bombs out at : `echo g++ -W -Wall-Wstack-usage=262144 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fmerge-constants -O2 -flto=auto -ffat-lto-objects -fexc

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #12 from Jason Vas Dias --- I will try with the last 'return' INSIDE the clause: +); +return; + } } -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
||jason.vas.dias at gmail dot com --- Comment #13 from Jason Vas Dias --- OK, I discovered the SAME test fails completely without either of my patches, but BOTH allow the particular GCC build I was trying to succeed - I'm going with the last one : ---BEGIN PATCH diff -up gold

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=29226 --- Comment #15 from Jason Vas Dias --- Created attachment 14131 --> https://sourceware.org/bugzilla/attachment.cgi?id=14131&action=edit gcc-12-local.spec --- Comment #16 from Jason Vas Dias --- Created attachment 14132 --> https://sourc

[Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence"

2022-06-05 Thread jason.vas.dias at gmail dot com
cover that the view+offset points to an 'rdssp' instruction ? Best Regards, Jason Vas Dias, a Software+Embedded Systems (VOIP) Engineer, West Cork, Ireland +353 84 874 9040 On 05/06/2022, jason.vas.dias at gmail dot com wrote: > https://sourceware.org/bugzilla/show_bug.cgi?id=29226