* Denys Vlasenko [2015-10-23 00:31:09 +0200]: > Let's say I need to add a gcc option to my musl build. > > configure says: > ... > Some influential environment variables: > CC C compiler command [detected] > CFLAGS C compiler flags [-Os -pipe ...] > CROSS_COMPILE prefix for cross compiler and tools [none] > LIBCC compiler runtime library [detected > > So I try this, combining all possible ways of passing CFLAGS > (past experience is that different projects do it differently). > > CFLAGS is in environment, and on both configure and make > command lines: > > export CFLAGS="-falign-functions=1" # for example > ./configure CFLAGS="$CFLAGS" > make CFLAGS="$CFLAGS" this is not what configure said... > Evidently, my CFLAGS replaced needed flags instead of being added at the end. > > Can this be fixed? If user needs to use e.g. EXTRA_CFLAGS instead, > please fix configure --help. it can be fixed, but i think 'needed flag' is not always clear and overriding CFLAGS on the make commandline is not polite. the attached patch makes this work, but i consider -Os to be not part of 'needed'