Skip to content

rust-mingw is missing libssp* #68973

Open
@glandium

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.O-windows-gnuToolchain: GNU, Operating system: WindowsT-infraRelevant to the infrastructure team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions