[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Piecewise linking failure on AIX
From: |
Albert Chin |
Subject: |
Piecewise linking failure on AIX |
Date: |
Tue, 30 Mar 2004 12:12:16 -0600 |
User-agent: |
Mutt/1.4i |
Piecewise linking fails on AIX because of a double-eval of
export_symbols_cmds. In ltmain.in we have:
# The command line is too long to link in one step, link piecewise.
$echo "creating reloadable object files..."
...
if ${skipped_export-false}; then
$show "generating symbol list for \`$libname.la'"
export_symbols="$output_objdir/$libname.exp"
$run $rm $export_symbols
libobjs=$output
# Append the command to create the export file.
1 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
fi
...
# Loop through the commands generated above and execute them.
save_ifs="$IFS"; IFS='~'
for cmd in $concat_cmds; do
IFS="$save_ifs"
2 eval cmd=\"$cmd\"
$show "$cmd"
...
Note the two evals. This reaks havok on AIX where:
export_symbols_cmds="\$NM -BCpg \$libobjs \$convenience | awk '{
if (((\\\$2 == \\\"T\\\") || (\\\$2 == \\\"D\\\") ||
(\\\$2 == \\\"B\\\")) && (substr(\\\$3,1,1) != \\\".\\\"))
{ print \\\$3 } }' | sort -u > \$export_symbols"
The solution is simple. Replace:
eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
with:
eval concat_cmds=\"\$concat_cmds~\$export_symbols_cmds\"
--
albert chin (address@hidden)
-- snip snip (patch against HEAD)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.393
diff -u -3 -p -r1.393 ltmain.in
--- ltmain.in 24 Mar 2004 03:03:05 -0000 1.393
+++ ltmain.in 30 Mar 2004 16:57:15 -0000
@@ -3943,7 +3944,7 @@ EOF
$run $rm $export_symbols
libobjs=$output
# Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+ concat_cmds="$concat_cmds~$export_symbols_cmds"
fi
# Set up a command to remove the reloadale object files
-- snip snip (patch against branch-1-5)
Index: ltmain.in
===================================================================
RCS file: /cvsroot/libtool/libtool/ltmain.in,v
retrieving revision 1.334.2.31
diff -u -3 -p -r1.334.2.31 ltmain.in
--- ltmain.in 24 Mar 2004 02:36:59 -0000 1.334.2.31
+++ ltmain.in 30 Mar 2004 16:57:29 -0000
@@ -3832,7 +3832,7 @@ EOF
$run $rm $export_symbols
libobjs=$output
# Append the command to create the export file.
- eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"
+ concat_cmds="$concat_cmds~$export_symbols_cmds"
fi
# Set up a command to remove the reloadale object files
- Piecewise linking failure on AIX,
Albert Chin <=