Skip to content

Configure GCC with --enable-default-pie #33

@MaskRay

Description

@MaskRay

Due to ASLR security hardening, most Linux distributions have switched to default PIE for their GCC builds for many years. Actually I cannot find a Linux distribution which doesn't use default PIE. See https://gist.github.com/thesamesam/f7a9c17df0165e86babb189fda8d3048 for a survey.

Many GCC build scripts like https://github.com/richfelker/musl-cross-make , glibc scripts/build-many-glibcs.py specify --enable-default-pie as well.

At this point, I think it makes more sense for compiler-explorer to match the Linux status quo, rather than the upstream default.

GCC feature request about switching the default for Linux: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103398

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions