Additional LDFLAGS needed by AIX
David Edelsohn
dje@watson.ibm.com
Fri Jan 11 18:28:00 GMT 2002
>>>>> Benjamin Kosnik writes:
Ben> Hmm. I don't think GLIBCPP_CHECK_LINKER_FEATURES should be clearing
Ben> either of these. In general, it looks like libstdc++-v3's efforts to
Ben> outsmart the linker have failed.
How about something like the appended patch?
David
* acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Do not clear
SECTION_LDFLAGS and OPT_LDFLAGS. Fix ac_sectionLDflags type.
*** acinclude.m4 Wed Dec 19 11:16:36 2001
--- acinclude.m4 Fri Jan 11 21:19:52 2002
***************
*** 286,293 ****
# If we're not using GNU ld, then there's no point in even trying these
# tests. Check for that first. We should have already tested for gld
# by now (in libtool), but require it now just to be safe...
! SECTION_LDFLAGS=''
! OPT_LDFLAGS=''
AC_REQUIRE([AC_PROG_LD])
# Set --gc-sections.
--- 286,293 ----
# If we're not using GNU ld, then there's no point in even trying these
# tests. Check for that first. We should have already tested for gld
# by now (in libtool), but require it now just to be safe...
! test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
! test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
AC_REQUIRE([AC_PROG_LD])
# Set --gc-sections.
***************
*** 315,321 ****
catch (...) { };
return 0;
}
! ], [ac_sectionLDflags=yes],[ac_sectionLFflags=no], [ac_sectionLDflags=yes])
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
--- 315,321 ----
catch (...) { };
return 0;
}
! ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
if test "$ac_test_CFLAGS" = set; then
CFLAGS="$ac_save_CFLAGS"
else
***************
*** 323,329 ****
CFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
! SECTION_LDFLAGS='-Wl,--gc-sections'
fi
AC_MSG_RESULT($ac_sectionLDflags)
fi
--- 323,329 ----
CFLAGS=''
fi
if test "$ac_sectionLDflags" = "yes"; then
! SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
fi
AC_MSG_RESULT($ac_sectionLDflags)
fi
***************
*** 331,337 ****
# Set linker optimization flags.
if test x"$ac_cv_prog_gnu_ld" = x"yes" &&
test x"$enable_debug" = x"no"; then
! OPT_LDFLAGS='-Wl,-O1'
fi
AC_SUBST(SECTION_LDFLAGS)
--- 331,337 ----
# Set linker optimization flags.
if test x"$ac_cv_prog_gnu_ld" = x"yes" &&
test x"$enable_debug" = x"no"; then
! OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
fi
AC_SUBST(SECTION_LDFLAGS)
More information about the Libstdc++
mailing list