Issue 1453: Python does not honor "CFLAGS" environment variable (original) (raw)
This issue has been migrated to GitHub: https://github.com/python/cpython/issues/45794
classification
Title: | Python does not honor "CFLAGS" environment variable | ||
---|---|---|---|
Type: | Stage: | ||
Components: | Build | Versions: | Python 2.5 |
process
Status: | closed | Resolution: | wont fix |
---|---|---|---|
Dependencies: | Superseder: | ||
Assigned To: | Nosy List: | gvanrossum, loewis, tebeka | |
Priority: | normal | Keywords: |
Created on 2007-11-16 18:19 by tebeka, last changed 2022-04-11 14:56 by admin. This issue is now closed.
Messages (8) | ||
---|---|---|
msg57588 - (view) | Author: Miki Tebeka (tebeka) * | Date: 2007-11-16 18:19 |
Setting CFLAGS environment variable do not show up in the build process, the gcc flags do not include the CFLAGS flags. | ||
msg57589 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2007-11-16 18:28 |
This depends on the version of Make used. See the man page for Make. | ||
msg57590 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2007-11-16 18:39 |
In all versions of make, "make CFLAGS=..." should work fine (although that's not an environment variable). | ||
msg57591 - (view) | Author: Miki Tebeka (tebeka) * | Date: 2007-11-16 19:05 |
I'll try to be clearer: `./configure --help` states (at the end): Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. What I've tried to do is compile Python with gprof, adding the -pg flag. So I ran `CFLAGS=-pg ./configure`, the resulting Makefile did not contained the -pg in the CFLAGS (or OPT) variables. Using `make CFLAGS=XXX` will override the CFLAGS definition in the Makefile, I just want to add to it. | ||
msg57592 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2007-11-16 19:24 |
I think you misunderstand. Passing a variable to configure makes that setting have effect *during the configure run*. | ||
msg57594 - (view) | Author: Miki Tebeka (tebeka) * | Date: 2007-11-16 19:53 |
OK, let's close it then. (However note that in two projects I've checked - vim and pcre the CFLAGS environment variable do get reflected in the build process) Any "standard" way to add custom compilation flags?. | ||
msg57595 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2007-11-16 20:06 |
> Any "standard" way to add custom compilation flags?. Beats me. I'm no autoconf expert. | ||
msg57596 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2007-11-16 20:17 |
> Any "standard" way to add custom compilation flags?. See the README. Set OPT to influence the optimization flags; set EXTRA_CFLAGS otherwise. |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:56:28 | admin | set | github: 45794 |
2007-11-16 20:17:11 | loewis | set | messages: + |
2007-11-16 20:06:08 | gvanrossum | set | status: open -> closedresolution: wont fixmessages: + |
2007-11-16 19:53:49 | tebeka | set | messages: + |
2007-11-16 19:24:39 | gvanrossum | set | messages: + |
2007-11-16 19:05:18 | tebeka | set | messages: + |
2007-11-16 18:39:33 | loewis | set | nosy: + loewismessages: + |
2007-11-16 18:28:51 | gvanrossum | set | nosy: + gvanrossummessages: + |
2007-11-16 18:19:39 | tebeka | create |