Index: apgcc
===================================================================
RCS file: /pack/anoncvs/autopackage/apbuild/apgcc,v
retrieving revision 1.88
diff -u -r1.88 apgcc
--- apgcc 2006/10/09 01:02:53 1.88
+++ apgcc 2006/10/12 04:31:08
@@ -446,10 +446,15 @@
} elsif ($_ eq '-pthread') {
$_[0] = "-lpthread";
- } elsif ($ENV{APBUILD_CXX_MODE} && /\/?libstdc\+\+\.so/ && defined($gxx2)) {
+ } elsif ($ENV{APBUILD_CXX_MODE} && /\/?libstdc\+\+\.so(.[56])?/) {
# drop this in double compile mode as it can cause issues
# in single-compile mode leave it alone, otherwise, libtool can break
- $dontAdd = 1;
+ # ^^^ That used to be true
+ # Now drop it and add the compilers stdc++
+ # Works around libtool problems where the wrong libstdc++.so is
+ # picked up from .la files of dependencies
+ my @command = ($gcc->command, "--print-file-name=libstdc++.so");
+ chomp($_[0] = `@command`);
} elsif (/(.*)\/?(lib.+\.so.*)/) {
$gcc->addSearchPaths ($1);