"-g" was added to CXXFLAGS in the GLIBCXX_CHECK_COMPILER_FEATURES configure test in libstdc++. This option causes G++ to warn: "-ffunction-sections may affect debugging on some targets". CXXFLAGS also includes "-Werror" causing the warning to become an error. This results in -ffunction-sections -fdata-sections being disabled.
"-ffunction-sections -fdata-sections" works fine on AIX and should be used because it generates functions as intended and improves performance by allowing the AIX linker to reorder functions. -- Summary: libstdc++ -ffunction-sections -fdata-sections disabled on AIX Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: major Priority: P3 Component: libstdc++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: dje at gcc dot gnu dot org GCC build triplet: powerpc-ibm-aix5.3.0.0 GCC host triplet: powerpc-ibm.aix5.3.0.0 GCC target triplet: powerpc-ibm-aix5.3.0.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35597