[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug ld/29226] New: gcc -fcf-protection option causes GCC 12 gccgo build
From: |
jason.vas.dias at gmail dot com |
Subject: |
[Bug ld/29226] New: gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence" |
Date: |
Sun, 05 Jun 2022 13:04:58 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=29226
Bug ID: 29226
Summary: gcc -fcf-protection option causes GCC 12 gccgo build
to fail : "failed to match split-stack sequence"
Product: binutils
Version: 2.38
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 Rocky Linux EL8
system, only modified by setting "%define _prefix /usr/local", renaming to
'gcc-12-local', and changing the Provides and sub-package Requires from 'gcc'
to
to 'gcc-12-local*' & removing the Obsoletes, AFTER building the
binutils-2.38-14.1-fc37.src.rpm, similarly renamed
'binutils-local-2.38-14.1.el8', similarly relocated under /usr/local ,
with $PATH set to /usr/local/bin:/usr/bin , to build EVERY supported
GCC language, including gnat, d, gccgo, and objc, the gccgo build
fails on this command:
```<quote><lit>
echo timestamp > s-zdefaultcc
/home/jvd/rpmbuild/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/./gcc/gccgo
-B/home/jvd/rpmbuild/BUILD/gcc-12.1.1-20220507/obj-x86_64-redhat-linux/./gcc/
-B/usr/local/x86_64-redhat-linux/bin/ -B/usr/local/x86_64-redhat-linux/lib/
-isystem /usr/local/x86_64-redhat-linux/include -isystem
/usr/local/x86_64-redhat-linux/sys-include -O2 -fexceptions -g
-grecord-gcc-switches -Wall -Wformat-security -Wp,-D_GLIBCXX_ASSERTIONS
-mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection
-fcf-protection -I ../x86_64-redhat-linux/libgo -static-libstdc++
-static-libgcc -Wl,-z,relro,-z,now -L ../x86_64-redhat-linux/libgo -L
../x86_64-redhat-linux/libgo/.libs -o cgo
../../gotools/../libgo/go/cmd/cgo/ast.go
../../gotools/../libgo/go/cmd/cgo/ast_go118.go
../../gotools/../libgo/go/cmd/cgo/doc.go
../../gotools/../libgo/go/cmd/cgo/gcc.go
../../gotools/../libgo/go/cmd/cgo/godefs.go
../../gotools/../libgo/go/cmd/cgo/main.go
../../gotools/../libgo/go/cmd/cgo/out.go
../../gotools/../libgo/go/cmd/cgo/util.go zdefaultcc.go
../x86_64-redhat-linux/libgo/libgotool.a
go1: warning: command-line option '-Wformat-security' is valid for
C/C++/ObjC/ObjC++ but not for Go
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 150
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 1e0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 220
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 260
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 2a0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 2e0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 320
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 360
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 3a0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 3e0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 420
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 460
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 4a0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 4e0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 520
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 560
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 5f0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 630
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 670
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 6b0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 6f0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 730
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 770
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 7b0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 7f0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 830
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 870
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 8b0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 8f0
/usr/local/bin/ld: error: /tmp/ccFdAbSm.o: failed to match split-stack sequence
at section 4 offset 1130
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:830: buildid] Error 1
make[2]: *** Waiting for unfinished jobs....
</lit></quote>
Investigation shows that ONLY removing '-fcf-protection' flag
allows the above command line to succeed with no errors or warnings.
I guess this COULD be either a GCC 12 bug, with gcc somehow putting
the wrong / incorrect information into objs for '-fcf-protection',
OR binutils's 'ld' is somehow interpreting this information incorrectly.
This is most annoying, as everything else about the build worked perfectly.
I will investigate to see if I can pin down precisely what
-fcf-protection information is being inserted and if / how it
is incorrect or ld is mis-interpreting it, unless anyone might know
and would please tell me ?
--
You are receiving this mail because:
You are on the CC list for the bug.
- [Bug ld/29226] New: gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence",
jason.vas.dias at gmail dot com <=
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05
- [Bug ld/29226] gcc -fcf-protection option causes GCC 12 gccgo build to fail : "failed to match split-stack sequence", jason.vas.dias at gmail dot com, 2022/06/05