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

Build library with -fPIC or offer an option to do it #1041

Closed
rhertzog opened this Issue Sep 14, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@rhertzog
Copy link
Contributor

rhertzog commented Sep 14, 2016

In Debian we would like to build all binaries with -fPIE by default (for security purpose) but this implies that you can only link with static libraries build with -fPIC. I would thus like to suggest to build cpputest with -fPIC (in Debian this has been suggested in http://bugs.debian.org/837363).

There might be platforms where this is not desirable so I'm fine if you put this as an optional configure-time feature.

In the mean time, please find the patch I used here:
build-with-fPIC.patch.txt

You can at least merge the parts where the flags set for the test executables are not copied from the flags used to build the library since they differ in my case.

@rhertzog

This comment has been minimized.

Copy link
Contributor

rhertzog commented Nov 2, 2016

Looks like -fPIC is not required, -fPIE is sufficient and that flag is implicitly enabled in Debian so I don't have to make any change to cpputest. See https://bugs.debian.org/842105

@rhertzog rhertzog closed this Nov 2, 2016

@basvodde

This comment has been minimized.

Copy link
Member

basvodde commented Nov 7, 2016

Oh ok. Thanks @rhertzog

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment