-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Always use PIC on FreeBSD, just like on Linux #2938
base: master
Are you sure you want to change the base?
Conversation
This fixes errors like 'can't create dynamic relocation R_AARCH64_...'
This shouldn't happen when linking shared druntime. The D modules for shared libraries are/should be explicitly compiled with |
This was coming from the variants macro I think. (But adding |
Used two times because it's added in |
hm. I actually ended up with these after screwing with the CMake files. The original errors are in curl
|
This is Phobos now, which should be compiled once as PIC too [without |
Argh... |
Yep looks like that helped |
Thx for checking. So is defaulting to PIC for FreeBSD safe/needed already, or would that fix suffice for the moment? |
Not strictly needed all the time I guess, but many C/C++ programs need it for various reasons. /usr/ports % rg "fPIC" | wc -l
917
/usr/ports % rg "CFLAGS.*fPIC" | wc -l
482 |
This fixes errors like
and allows ASLR on HardenedBSD (/ "coming soon" ASR on upstream FreeBSD) to do its thing