#26 remove redundant / outdated flags from RUSTFLAGS
Merged by decathorpe. Opened by decathorpe.
Unknown source main

Download 26.patch
  • Support for "Full" RELRO (i.e. RELRO and BIND_NOW) has been enabled in rustc by default on all architectures for a while.
  • The "--cap-lints=warn" flag only downgrades some compiler errors to warnings, but those issues should likely be actual errors.

See https://pagure.io/fedora-rust/rust-packaging/issue/24 for the related discussion.

Pull-Request has been merged by decathorpe

It looks like --cap-lints=warn actually did some good work for us. I'm now getting build failures from a dozen or two packages that use deny(warnings) since that flag was dropped ... not sure if we want to add it back.

Yes, please put it back. It effectively keeps us out of Werror hell.

Also, for the full relro stuff, is it enabled by default for riscv64 yet?

Yeah ... I see that there's a ton of packages that started to fail to build in koschei. Some of which with actual issues that were masked by --cap-lints=warn (like actual UB), though ...

According to @jistone, yes, relro and bind_now are now enabled everywhere.

I've released 26.2 which reintroduces --cap-lints=warn. It will hide some legitimate problems, but it will also unbreak dozens of existing packages. I'll take a snapshot of the koschei status before I push the update, if I have time I'll go through failures to check for legit issues.

Yes, the base config for Linux targets enables full RELRO, and I see no override for riscv or anything else at this point. You can also confirm with:

rustc -Z unstable-options --print target-spec-json --target riscv64gc-unknown-linux-gnu

(using nightly or RUSTC_BOOTSTRAP=1)

Some of which with actual issues that were masked by --cap-lints=warn (like actual UB), though ...

Yeah, it's tough, especially since that weakens even more serious deny-by-default lints, not just those from aggressive deny(warnings). I think we used to patch that out, and --cap-lints was basically giving up on that effort.

Metadata