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

Enable -fPIC for some packages #1690

Merged
merged 10 commits into from Jul 1, 2017

Conversation

@lrusak
Copy link
Member

commented Jun 14, 2017

I needed this when building without lto support. I don't think it should harm anything but would be work including in a @MilhouseVH build

lrusak added 5 commits Jun 14, 2017
lrusak added 5 commits Jun 15, 2017
@lrusak

This comment has been minimized.

Copy link
Member Author

commented Jun 15, 2017

at this point it might be worth adding -fPIC to the global CFLAGS and adding a strip_fpic options like we have for lto and gold

@stefansaraev is there any downside to building all packages with -fPIC?

@stefansaraev

This comment has been minimized.

Copy link
Contributor

commented Jun 15, 2017

@lrusak none. on (at least) x86_64 architecture, code that is compiled into static library is required to be position-independent if it will be used in a shared library.

so, all packages that are built with --enable-static --disable-shared (static only) should have --with-pic (or -fPIC in C/CXXFLAGS).

EDIT: -fPIC in global *FLAGS is not a good idea, you may experience build failures later if you do so ;)

@lrusak

This comment has been minimized.

Copy link
Member Author

commented Jun 16, 2017

Ok well maybe this is the way to go then instead of adding -fPIC to the global CFLAGS

@lrusak

This comment has been minimized.

Copy link
Member Author

commented Jul 1, 2017

please merge

@CvH
CvH approved these changes Jul 1, 2017

@CvH CvH merged commit f491371 into LibreELEC:master Jul 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.