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 #6 from djfd at mail dot ru --- Well, I can use CC="gcc --sysroot=/" approach too. And did try it. But at some stage it stop working too. Sorry, I cannot recall what exactly was wrong with this method, and too lazy to reproduce it. It seems some parts are using g++ for linking in which case compilation flags are dropped off somehow (but I am unsure, so may be wrong). Just FYI. Current behaviour is unexpected. User passing the flags globally does expect they will be propagated down and not stopped at high (top level configure) level. I did spent a day trying to see why the flags passed do not work. And there will be probaly only 1/1000 user faced to this. Hopefully he will have enough sklls to see what is going wrong. I am trying to pass exactly sysroot switch and a few associated switches. Why? Just because --with-sysroot option works, at my opinion, not so good. eg. if I have --with-sysroot set, then, say, --with-gmp switch is enough to be set as --with-gmp==relative/to/sysroot but it does not work at configure stage (cannot find gmp.h, because configure gcc calls are not affected by that --with-sysroot). If I set an absolute paths for --with-gmp along with the --with-sysroot then configure stage works fine, but I got a linker error like this: cannot find /sysroot/lib/some-lib.so within /syroot/lib/sysroot/lib (like this, just from memory).