From 3cf62bc2320686e60feef9ebfa2a6b134223fe6f Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Thu, 24 Nov 2005 15:22:59 +0000 Subject: [PATCH] * ltmain.in (link mode): Use $pic_object as $non_pic_object if $non_pic_object=none. * NEWS: Updated. Missing backport from HEAD 2004-09-03 noted by Max Bowsher . --- ChangeLog | 8 ++++++++ NEWS | 3 +++ ltmain.in | 10 ++++++++++ 3 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index 4595a95e5..ce74acc02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2005-11-24 David Edelsohn + + * ltmain.in (link mode): Use $pic_object as $non_pic_object if + $non_pic_object=none. + * NEWS: Updated. + Missing backport from HEAD 2004-09-03 noted + by Max Bowsher . + 2005-11-20 Ralf Wildenhues * ltmain.in (link mode): Pass through `-pg', for GCC. diff --git a/NEWS b/NEWS index 551d7bce1..188f360fb 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ New in 1.5.21a: 2005-??-??; CVS version 1.5.21a, Libtool team: link statically against installed libtool libraries, contrary to documented (and actual 1.4.x) behavior. * Support for Interix 3 (Windows SFU). +* If non-pic objects were not compiled, and libtool is called in link mode, + libtool no longer silently creates an empty archive, but rather falls + back to pic objects. * Bug Fixes. New in 1.5.20: 2005-08-31; CVS version 1.5.19a, Libtool team: diff --git a/ltmain.in b/ltmain.in index 29c60a9ee..119e83f92 100644 --- a/ltmain.in +++ b/ltmain.in @@ -1271,6 +1271,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. @@ -1799,6 +1804,11 @@ EOF if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi + else + # If the PIC object exists, use it instead. + # $xdir was prepended to $pic_object above. + non_pic_object="$pic_object" + non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. -- 2.47.3