libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

solving of name conflicts in included .a


From: Jan Kratochvil
Subject: solving of name conflicts in included .a
Date: Thu, 7 Nov 2002 09:46:36 +0100
User-agent: Mutt/1.4i

Hi,

When you include convenience library (.a) containing two conflicting name
objects (same basename from two different directories) only one of those two
object files will survive in ".libs/libA.lax/" arena:
        rm -fr .libs/libA.lax/libB.a
        mkdir .libs/libA.lax/libB.a
        (cd .libs/libA.lax/libB.a && ar x /abs/path/to/A/B/.libs/libB.a)

The attached patch implements automatic renaming of "*.*" to "*-$seqnum.*"
in such case:
        libtool: link: warning: object name conflicts; renaming object files
        libtool: link: warning: to ensure that they will not overwrite
        (cd .libs/libA.lax/libB.a && ar xN 1 /abs/path/to/A/B/.libs/libB.a 
'XconflictX.o' && mv -f 'XconflictX.o' 'XconflictX-1.o')
        (cd .libs/libA.lax/libB.a && ar xN 2 /abs/path/to/A/B/.libs/libB.a 
'XconflictX.o' && mv -f 'XconflictX.o' 'XconflictX-2.o')

Although reanming to a new name may be confusing IMO there is no better option.
The original (conflicting) name is not left there in any instance to prevent
misleading confusion of different object file found than expected.

Patched against current libtool CVS. "works4me".
Posted here w/o subscription 4 days ago, I hope listadmin won't approve a dupe.


Best Regards,
Lace

Attachment: libtool-ltmain.in-ar_x_conflicts.diff
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]