diff options
author | stanton <stanton> | 1999-03-10 05:52:45 (GMT) |
---|---|---|
committer | stanton <stanton> | 1999-03-10 05:52:45 (GMT) |
commit | 0b4be24161f5971f3181adec27a32becf7cb8870 (patch) | |
tree | 92131df26a09a5f7b28f854fb7c0a62ba26cb8ac /unix/ldAix | |
parent | a5bface5b6607af37870fc5f5ee5019f6d5fb3f1 (diff) | |
download | tcl-0b4be24161f5971f3181adec27a32becf7cb8870.zip tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.gz tcl-0b4be24161f5971f3181adec27a32becf7cb8870.tar.bz2 |
Merged stubs changes into mainline for 8.0
Diffstat (limited to 'unix/ldAix')
-rwxr-xr-x | unix/ldAix | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -10,7 +10,7 @@ # symbols exported by those files, and then invokes "ldCmd" to # perform the real link. # -# RCS: @(#) $Id: ldAix,v 1.2 1998/09/14 18:40:16 stanton Exp $ +# RCS: @(#) $Id: ldAix,v 1.3 1999/03/10 05:52:52 stanton Exp $ # Extract from the arguments the names of all of the object files. @@ -23,6 +23,9 @@ for i do fi done +# Extract the name of the object file that we're linking. +outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'` + # Create the export file from all of the object files, using nm followed # by sed editing. Here are some tricky aspects of this: # @@ -49,13 +52,12 @@ if test $osver -eq 3; then nmopts="-e" fi rm -f lib.exp -echo "#! " >lib.exp +echo "#! $outputFile" >lib.exp /usr/ccs/bin/nm $nmopts -h $ofiles | sed -e '/:$/d' -e '/ U /d' -e '/[ ]0|extern/d' -e '/unamex/d' -e 's/^\.//' -e 's/[ |].*//' | sort | uniq >>lib.exp -# Extract the name of the object file that we're linking. If it's a .a -# file, then link all the objects together into a single file "shr.o" -# and then put that into the archive. Otherwise link the object files -# directly into the .a file. +# If we're linking a .a file, then link all the objects together into a +# single file "shr.o" and then put that into the archive. Otherwise link +# the object files directly into the .a file. outputFile=`echo $args | sed -e 's/.*-o \([^ ]*\).*/\1/'` noDotA=`echo $outputFile | sed -e '/\.a$/d'` |