------- Comment #1 from bero at arklinux dot org 2009-02-05 13:50 ------- Since the purpose of the AC_TRY_LINK statement in libstdc++/acinclude.m4, line 260, is just to check if the linker barfs when given an argument, probably just moving the GLIBCXX_CHECK_LINKER_FEATURES call to come before GCC_NO_EXECUTABLES invocation should fix it.
Another possibility would be to just replace the AC_TRY_LINK call with something along the lines of if LANG=C $LD --gc-sections |grep -q "unrecognized option"; then # bad ld else # good ld fi -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39107