-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Open
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsT-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.
Description
The GCC compiler that comes with rust-mingw understands -fstack-protector-strong
and emits stack-protector code, but the build further fails to link with messages like:
C:\Users\task_1581171456\repo\git-core\libcinnabar.a(cinnabar-fast-import.o):cinnabar-fast-import.c:(.text+0x291): undefined reference to `__stack_chk_fail'
The missing symbol is normally added by gcc
to the ld
command line via -lssp_nonshared -lssp
, when it's passed -fstack-protector-strong
during linking. Adding -fstack-protector-strong
via RUSTFLAGS=-Clink-arg=-fstack-protector-strong
doesn't actually work because of -nostdlib
that rust adds on its own, but RUSTFLAGS=-Clink-arg=-lssp_nonshared -Clink-arg=-lssp
doesn't work either because libssp* is not provided by rust-mingw.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsToolchain: GNU, Operating system: WindowsT-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.Relevant to the infrastructure team, which will review and decide on the PR/issue.