From patchwork Fri Jul 2 15:24:53 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [build,doc,v3] Support Sun symbol versioning in libstdc++-v3, rev. 2 Date: Fri, 02 Jul 2010 05:24:53 -0000 From: Rainer Orth X-Patchwork-Id: 57670 Message-Id: To: IainS Cc: GCC Patches IainS writes: > from ld (tools version 2.5) manual page linked earlier: > -M (32-bit only) Produce a load map, listing all the segments and > sections. The list includes the address where each input file's section > appears in the output file, as well as the section's size. This option > overlaps with a compiler option. If you use the compiler driver cc(1) to > invoke ld, invoke this option in this way: -Wl,-M. > so, although it's not listed in the 3.2.x tools, I imagine that it is > silently ignored for backward-compatibility. That's what I feared. At first, I was tempted to use the same hack as in the libjava configure.ac, but since the check for Sun style symbol versioning makes sense only on Solaris, I'd go for the following instead. Could you please give it a try on Darwin? If it works for you, I'll commit as obvious. Thanks. Rainer 2010-07-02 Rainer Orth libssp: * configure.ac (ssp_use_symver): Only check for Sun-style symbol versioning on Solaris 2. * configure: Regenerate. diff -r 08cc828c8afb libssp/configure.ac --- a/libssp/configure.ac Mon Jun 28 16:33:40 2010 +0200 +++ b/libssp/configure.ac Fri Jul 02 17:23:54 2010 +0200 @@ -86,15 +86,19 @@ EOF AC_TRY_LINK([int foo;],[],[ssp_use_symver=gnu],[ssp_use_symver=no]) if test x$ssp_use_symver = xno; then - LDFLAGS="$save_LDFLAGS" - LDFLAGS="$LDFLAGS -fPIC -shared -Wl,-M,./conftest.map" - # Sun ld cannot handle wildcards and treats all entries as undefined. - cat > conftest.map < conftest.map <