8000 set no-PIC no-PIE compile options explicitly by anzz1 · Pull Request #1075 · rehlds/ReHLDS · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

set no-PIC no-PIE compile options explicitly #1075

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

anzz1
Copy link
Contributor
@anzz1 anzz1 commented Jan 13, 2025

In some distros gcc is compiled with -fpic -pie as default, so clearing cxxflags is not enough to prevent PIC/PIE

  • set compile flags -fno-pic -fno-pie
  • set link flags -no-pie -Wl,--no-export-dynamic

for gcc in all CMakeLists explicitly

Also set -fno-strict-aliasing and -fno-strict-overflow.
Modern GCC no longer use these as default which will lead to bugs caused by wrong optimizations.

anzz1 added 2 commits January 13, 2025 05:58
in some distros gcc is compiled with -fpic -pie as default, so clearing cxxflags is not enough to prevent PIC/PIE
set compile flags '-fno-pic -fno-pie'
set link flags '-no-pie -Wl,--no-export-dynamic'
for gcc in all CMakeLists
Modern GCC no longer use these as default which will lead to bugs caused
by wrong optimizations
@wopox1337 wopox1337 requested a review from s1lentq February 14, 2025 05:51
@stamepicmorg stamepicmorg added Priority: 🕒 low Low priority tasks that can be postponed for the future. Type: 🧹 chore Routine tasks, maintenance, or non-user-facing changes. Status: 👀 needs review Requires code or changes review. Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Engine: ⚙️ Independent Case do not refer to any Engine. OS: 🐧 Linux Case refers to Linux. labels Apr 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Difficulty: 🟡 medium Task of medium difficulty requiring moderate effort. Engine: ⚙️ Independent Case do not refer to any Engine. OS: 🐧 Linux Case refers to Linux. Priority: 🕒 low Low priority tasks that can be postponed for the future. Status: 👀 needs review Requires code or changes review. Type: 🧹 chore Routine tasks, maintenance, or non-user-facing changes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0