Open
Description
opened on Feb 8, 2020
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.
Activity