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

Adding support for position independent code when compiling in static #21

Closed
sandvige opened this issue Sep 3, 2012 · 2 comments
Closed

Comments

@sandvige
Copy link

sandvige commented Sep 3, 2012

Adding zlib as a static part of a shared library is not supported without editing the Makefile after executing ./configure (with --static), which could be a nice feature.

@dandesousa
Copy link

For gcc i've used this workaround that doesn't require editing the Makefile.

The work around for this is to set your base CFLAGS:

CFLAGS=-fPIC ./configure

You can add --static for just generating the static build. This request is pretty old but hopefully its still of use to someone.

@madler
Copy link
Owner

madler commented Aug 2, 2015

Solution provided by dandesousa.

@madler madler closed this as completed Aug 2, 2015
geoff-nixon referenced this issue in geoff-nixon/zlib May 6, 2016
Unbreak things: import the right zconf.h
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants