Thanks. Specifying CFLAGS_FOR_TARGET at configuration time does the trick. I previously tried sending that in the top-level make command line like make CFLAGS_FOR_TARGET="-mandroid -O2 -g" but it failed. The Android C library is not affected by this. It is built outside of the toolchain seperately. -Doug 2009/1/16 Ian Lance Taylor <iant@xxxxxxxxxx>: > "Doug Kwan (關振德)" <dougkwan@xxxxxxxxxx> writes: > >> I tried CFLAGS_FOR_TARGET, CXXFLAGS_FOR_TARGET, and >> LIBCFLAGS_FOR_TARGET and LIBCXXFLAGS_FOR_TARGET but these got dropped >> by libtool. I don't know if that is a feature of libtool or not. > > libtool won't use them, but that isn't how it works. When the top > level Makefile builds target-libstdc++-v3, it passes > CFLAGS=$(CFLAGS_FOR_TARGET). You do have to run make at the top > level, always. (Although, if you set CFLAGS_FOR_TARGET when you run > configure, then I believe that that will become the default CFLAGS for > the target libraries). > > This may not apply to the Android libc--it depends on how the > configury/make was set up. It should work for libstdc++-v3. I've > used it. > > Ian >