Skip to content


Subversion checkout URL

You can clone with
Download ZIP


configure script ignores CFLAGS and CXXFLAGS being passed #5195

rofl0r opened this Issue · 7 comments

4 participants


is the canonical way to pass custom C[XX]FLAGS to configure scripts

doesnt work with node, instead you have to mess around with the generated config files.


It's an artifact of gyp, the build system. You can't pass it CFLAGS/CXXFLAGS at Makefile generation time (it ignores them) and there's no reliable way to pass them through the .gyp or .gypi file.

Just pass your flags to make: make CFLAGS="..." CXXFLAGS="..."

@bnoordhuis bnoordhuis closed this

well i think this could be easily added to the build system.
the flags i entered manually into cflags: in the gypi file are passed to both gcc and g++.


The key here is 'manually'. Now try to have them carry over from the configure file automatically (and override the pre-set flags). If you can get it to work without breaking other things, send a pull request.


@bnoordhuis Out of interest, would it perhaps make sense to pass this to if users insist on a autoconf-like variable passing? I'm just as happy with FOO= make


the problem with FOO= make is that people are not used to it.
they know how autoconf behaves and expect the same from pseudo-configure scripts.
you dont want them all to come here and open a bug report either, i suppose ?


I'd be ok with a patch to support this kind of behavior, but it's not a high priority issue for us, and would probably have to be an upstream patch to gyp first.


unfortunately one needs a google account to report issues on the gyp issue tracker, and even to subscribe to their google groups. since that requires a mobile phone and general loss of privacy, i am unable to register.
could someone with a google account open an issue there and link this issue and #5197 to them ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.