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

rhertzog opened this Issue Sep 14, 2016 · 2 comments


None yet
2 participants
Copy link

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

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:

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.


This comment has been minimized.

Copy link

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

@rhertzog rhertzog closed this Nov 2, 2016


This comment has been minimized.

Copy link

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