|
|
|
|
Patch fixes linking of convenience libraries (.a) containing two conflicting name objects.
Summary | Handle duplicate object file names |
License | GNU General Public License |
State | This patch got already integrated by the original package maintainer. |
Download patch | ltmain.in.diff?r1=1.320&r2=1.321 |
Programming language | sh patch |
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 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 renaming 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.
EOF