[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
IRIX Mips Pro Compiler ii_files patch
From: |
Mike Caruso |
Subject: |
IRIX Mips Pro Compiler ii_files patch |
Date: |
Mon, 13 Nov 2000 11:00:29 -0500 |
Hi,
Here is some code I added to my libtool script that got
generated for
me in order to support the Mips Pro compiler's template instantiation
scheme which dumps mangled symbol information into files under a
directory named ii_files. The compiler blows up when used by libtool
because of all the moving and renaming of files that goes on under
libtool, this patch fixes that and I'm SURE its just a hack, but it
seems to work fine for me, I would be curious as to what is the more
general solution. Im using IRIX 6.5 Mips Pro Compiler 7.2.1.3m
The following is what I have added with some extra text around it for
context:
# Do each of the archive commands.
if test -n "$export_symbols" && test -n "$archive_expsym_cmds";
then
eval cmds=\"$archive_expsym_cmds\"
else
eval cmds=\"$archive_cmds\"
fi
echo "*** IRIX ii_files PATCH ***"
# Create the ii_files directory if it doesnt exist
if [ ! -d ii_files ]; then
mkdir ii_files
fi
# loop over each file in the .libs/ii_files directory
for iiFile in `ls -1 .libs/ii_files`
do
# Get the base name of this ii_file: BaseName.lo.ii
iiFileBase=`echo $iiFile | cut -d'.' -f1`
# copy it one level up since thats where the link stage takes
place
cpcmd="cp .libs/ii_files/$iiFile ii_files/$iiFileBase.ii"
echo $cpcmd
eval $cpcmd
# Use a perl command to fix the names of the object files
# Im sure this can be done in sed, i just dont know sed at all
pcmd="perl -p -i.bak
-e\"s/\\.libs\/$iiFileBase\\.lo/$iiFileBase\\.o/g\"
ii_files/$iiFileBase.ii"
echo $pcmd
eval $pcmd
# remove perl left overs
rm ii_files/$iiFileBase.ii.bak
done
echo "*** End Patch ***"
IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
for cmd in $cmds; do
IFS="$save_ifs"
$show "$cmd"
$run eval "$cmd" || exit $?
done
IFS="$save_ifs"
Thanks I hope this helps... let me know if I can help out
--
Mike Caruso / SAIC Army Night Vision Labs
Software Engineer
Ft. Belvoir, VA. (703) 704 2714
McLean, VA. (703) 748 4177
- IRIX Mips Pro Compiler ii_files patch,
Mike Caruso <=