diff options
author | Loren J. Rittle <ljrittle@acm.org> | 2002-05-06 21:26:49 +0000 |
---|---|---|
committer | Loren J. Rittle <ljrittle@gcc.gnu.org> | 2002-05-06 21:26:49 +0000 |
commit | 97320a3f230eb28eae3f084c7e4543dbd64a1d8e (patch) | |
tree | 04e9805082b5dc717e6ad9402bbd91c4f307ca53 | |
parent | b56238290248e1a15fe0c3251ceb26cda3643db6 (diff) | |
download | gcc-97320a3f230eb28eae3f084c7e4543dbd64a1d8e.zip gcc-97320a3f230eb28eae3f084c7e4543dbd64a1d8e.tar.gz gcc-97320a3f230eb28eae3f084c7e4543dbd64a1d8e.tar.bz2 |
ltmain.sh: Detect and handle object name conflicts while piecewise linking a static library.
* ltmain.sh: Detect and handle object name conflicts
while piecewise linking a static library.
From-SVN: r53237
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | ltmain.sh | 14 |
2 files changed, 19 insertions, 0 deletions
@@ -1,3 +1,8 @@ +2002-05-06 Loren J. Rittle <ljrittle@acm.org> + + * ltmain.sh: Detect and handle object name conflicts + while piecewise linking a static library. + 2002-05-05 Alexandre Oliva <aoliva@redhat.com> * configure.in (noconfigdirs): Don't disable libgcj on @@ -4247,6 +4247,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" |