http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49685
Summary: libgcc_s.so not compiled without optimization when requested Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassig...@gcc.gnu.org ReportedBy: y...@tsoft.com I need to have libgcc_s.so without optimization and with debug info. Following documentation on GCC own site http://gcc.gnu.org/onlinedocs/libstdc++/manual/debug.html, I ran make with overriding compilation flags: make CXXFLAGS='-g3 -fno-inline -O0' CFLAGS='-g3 -fno-inline -O0' all But the resulting libgcc_s.so is still optimized. I could see that "-O 2" was passed to all compiles. Actually, gcc build process should respect the given to the top-level make CFLAGS and CXXFLAGS and propagate them to all levels.