summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLoren James Rittle <rittle@latour.rsch.comm.mot.com>2002-05-06 13:38:13 +0000
committerRobert Boehne <rboehne@gnu.org>2002-05-06 13:38:13 +0000
commitff0640879378ce673e282fc2611f7a75d6c3b2d7 (patch)
tree6f4ca9574969310f243b3afaff96c7cdb70cd0bb
parent9a3c2107e54a2065f96aa95bd9747bbaa9e7a4b3 (diff)
downloadlibtool-ff0640879378ce673e282fc2611f7a75d6c3b2d7.tar.gz
* ltmain.sh: Detect and handle object name conflicts while
piecewise linking a static library.
-rw-r--r--ChangeLog5
-rw-r--r--ltmain.in14
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ebc04e98..2d1ff7c5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-05-06 Loren James Rittle <rittle@latour.rsch.comm.mot.com>
+
+ * ltmain.sh: Detect and handle object name conflicts while
+ piecewise linking a static library.
+
2002-05-02 Dave Vasilevsky <thevas@mac.com>
* ltmain.in: Remove convenience libraries from deplibs for Darwin.
diff --git a/ltmain.in b/ltmain.in
index c6865f44..4487ab72 100644
--- a/ltmain.in
+++ b/ltmain.in
@@ -4326,6 +4326,20 @@ fi\
objlist=
concat_cmds=
save_oldobjs=$oldobjs
+ # GNU ar 2.10+ was changed to match POSIX; thus no paths are
+ # encoded into archives. This makes 'ar r' malfunction in
+ # this piecewise linking case whenever conflicting object
+ # names appear in distinct ar calls; check, warn and compensate.
+ if (for obj in $save_oldobjs
+ do
+ $echo "X$obj" | $Xsed -e 's%^.*/%%'
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2
+ $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2
+ AR_FLAGS=cq
+ fi
for obj in $save_oldobjs
do
oldobjs="$objlist $obj"