------- Comment #2 from bero at arklinux dot org 2009-02-05 13:52 ------- A bit below the check for --gc-sections, GLIBCXX_CHECK_LINKER_FEATURES actually checks for another linker feature in a way that doesn't break crosscompiling:
cxx_z_relo=`$LD -v --help 2>/dev/null | grep "z relro"` if test -n "$cxx_z_relo"; then OPT_LDFLAGS="-Wl,-z,relro" ac_ld_relro=yes fi AC_MSG_RESULT($ac_ld_relro) The same trick will work for gc-sections as well. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39107