http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59365
djfd at mail dot ru changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|INVALID |--- --- Comment #4 from djfd at mail dot ru --- (In reply to Jonathan Wakely from comment #3) > See > http://www.gnu.org/software/make/manual/html_node/Overriding.html#Overriding > > Either use make STAGE1_CFLAGS=blah or use make -e to take values from the > environment. Hi Jonathan well, your approach to the problem solving is a few better: rm -rf bld/gcc mkdir bld/gcc 2>/dev/null ; cd bld/gcc export STAGE1_CFLAGS="--sysroot=/" export STAGE1_CXXFLAGS="--sysroot=/" ../../gcc-4.8.2/configure \ --prefix=$PFX \ --with-gmp=$PFX \ --with-mpfr=$PFX \ --with-mpc=$PFX \ && make STAGE1_CFLAGS=$STAGE1_CFLAGS STAGE1_CXXFLAGS=$STAGE1_CXXFLAGS ^C find -name config.status -print0 | xargs -0 egrep '"C(XX)?FLAGS"' ./config.status:S["CXXFLAGS"]="-g -O2" ./config.status:S["CFLAGS"]="-g -O2" ./libiberty/config.status:S["CFLAGS"]="--sysroot=/" ./lto-plugin/config.status:S["CFLAGS"]="--sysroot=/" ./gcc/config.status:S["CXXFLAGS"]="--sysroot=/ " ./gcc/config.status:S["CFLAGS"]="--sysroot=/ " ./intl/config.status:S["CFLAGS"]="--sysroot=/" The only thing. pls note on upper two string of search results. Still default "-g O2". ie, instead of just specifying CFLAGS/CXXFLAGS to be used at all process stages, including the congigure pass (by either of means: prefixed to configure, passed to make directly or via -e swithch) I will need to have C(XX)?FLAGS set (for configure purposes, otherwise it wont work) and for stage1 STAGE1_C(XX)?FLAGS, that is doubling [my] configuration efforts. Seems to be a few illogical, but it is ok. I have already found my way of handling that, namely: sed -ri 's/^(stage1_cflags="-g)"$/\1 $CFLAGS"/' configure Was it funny? Certainly. So why am I trying to prevent others from doing same?? Best Regards