Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore (some) compiler sanity #1584

Merged
merged 2 commits into from Mar 19, 2021

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Mar 18, 2021

-fno-strict-overflow tells gcc and clang to handle signed integer and (at least on gcc) pointer arithmetic wraparound using twos-complement representation like deity intended.

-fno-delete-null-pointer-checks tells gcc not to "optimize" away programmer added safeguards. Really.

Suggested by Demi Marie Obenour.

While at it, clean up some excess flags that have no business in upstream defaults, such as -fstack-protector which has caused us various headaches over the years.

Replaces #1501

-D_REENTRANT is a remnant from ancient past, may have been necessary
with bundled BDB at some point.

-fstack-protector was added in 2008 by much more innocent your struly.
Hardening flags like are best left for distro policies, drop
-fstack-protector from our defaults, it has caused all manner of
trouble as it is (commit f9c69f8,
c810a0a).
-fno-strict-overflow tells gcc and clang to handle signed integer and
(at least on gcc) pointer arithmetic wraparound using twos-complement
representation like deity intended.

-fno-delete-null-pointer-checks tells gcc not to "optimize" away
programmer added safeguards. Really.

Suggested by Demi Marie Obenour.
@pmatilai pmatilai merged commit 5ee567e into rpm-software-management:master Mar 19, 2021
@pmatilai pmatilai deleted the csane-pr branch June 21, 2021 11:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant