diff options
author | stanton <stanton@noemail.net> | 1999-03-10 05:52:44 (GMT) |
---|---|---|
committer | stanton <stanton@noemail.net> | 1999-03-10 05:52:44 (GMT) |
commit | 3590769e600141e2a2a0e8413790130248ed65ee (patch) | |
tree | 92131df26a09a5f7b28f854fb7c0a62ba26cb8ac /unix/ldAix | |
parent | 6aec87e7efaa5196e38566cf45beecc6c2496510 (diff) | |
download | tcl-3590769e600141e2a2a0e8413790130248ed65ee.zip tcl-3590769e600141e2a2a0e8413790130248ed65ee.tar.gz tcl-3590769e600141e2a2a0e8413790130248ed65ee.tar.bz2 |
Merged stubs changes into mainline for 8.0
FossilOrigin-Name: 19696933517612024e7dbcfee6e3c8d3b4e41772
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'` |