This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libtool PATCH, committed] Use pic_object as fallback for non_pic_object in ltmain.sh
- From: David Edelsohn <dje at watson dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Wed, 08 Sep 2004 11:49:08 -0400
- Subject: [libtool PATCH, committed] Use pic_object as fallback for non_pic_object in ltmain.sh
The following is a backport approved by Alexandre Oliva of a patch
accepted upstream in GNU libtool to fallback to the PIC object if non-PIC
object does not exist when invoking libtool with "-static" option.
David
* ltmain.sh: Use $pic_object as $non_pic_object if
$non_pic_object=none.
Index: ltmain.sh
===================================================================
RCS file: /cvs/gcc/gcc/ltmain.sh,v
retrieving revision 1.23
diff -c -p -r1.23 ltmain.sh
*** ltmain.sh 4 Feb 2004 23:58:48 -0000 1.23
--- ltmain.sh 8 Sep 2004 15:39:52 -0000
*************** EOF
*** 1041,1046 ****
--- 1041,1051 ----
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.
*************** EOF
*** 1466,1471 ****
--- 1471,1481 ----
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.