Additional LDFLAGS needed by AIX

David Edelsohn dje@watson.ibm.com
Fri Jan 11 10:20:00 GMT 2002


	Alright, Ben, calm down! (:^)

	I need some way of inserting an additional LDFLAG when linking
shared libraries on AIX, similar to OPT_LDFLAGS and SECTION_LDFLAGS.  I
thought about abusing one of those two existing LDFLAGS, but
configure.target is included before those to flags are cleared in
GLIBCPP_CHECK_LINKER_FEATURES:

  SECTION_LDFLAGS=''
  OPT_LDFLAGS=''

I tried defining LDFLAGS_FOR_TARGET in config/mt-aix43, but it created
other problems.

	The additional flag I need is -G (-Wl,-G) so that AIX links
libstdc++ "rtl-ready", allowing symbols in libraries and executables to
use the same copy, matching SVR4 behavior that libstdc++ expects.  If I
set LDFLAGS_FOR_TARGET to -Wl,-brtl as a special signal to libtool, the
library is named in a way requiring that all executable require -brtl.  If
I set LDFLAGS_FOR_TARGET to -Wl,-G then configure for target libraries
gets hopelessly confused.

	So, I need some way to add -Wl,-G just for libstdc++.  Does anyone
have a suggestion for how to add this?  Should OPT_LDFLAGS or
SECTION_LDFLAGS not clear any previous value?  Or should I add
EXTRA_LDFLAGS or TARGET_LDFLAGS to all of the libstdc++ Makefiles?

Thanks, David



More information about the Libstdc++ mailing list