[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch] list of input files if max_cmd_len exceeded
From: |
David Edelsohn |
Subject: |
Re: [patch] list of input files if max_cmd_len exceeded |
Date: |
Thu, 14 Apr 2005 10:59:20 -0400 |
>>>>> Ralf Wildenhues writes:
Ralf> What would the linker do with special characters in file names?
Ralf> Not that it would matter for libtool ATM, but this might change (at
Ralf> least the dollar sign would be helpful), so it'd be good to know what
Ralf> breaks then.
AIX allows file globbing on the list, so '*' and '?' are allowed,
but libtool does not need that capability. Any other characters would be
considered part of a filename and would cause the link to fail if the file
did not exist.
Ralf> Unnecessary. Just do
Ralf> $ECHO "X$save_libobjs" | $Xsed | $SP2NL > $output
Ralf> instead of looping over every file. Note that $ECHO may only take one
Ralf> argument. Also, your patch does not remove $output before using, so a
Ralf> second link would have a wrong list.
I do not understand the latter comment about removing the $output
file. My patch adds
delfiles="$delfiles $output"
output=\"$file_list_spec$filelist\"
which sets delfiles to the linker script before output is redefined to the
spec that references the linker script. The existing libtool algorithm
includes:
# Append the command to remove the reloadable object files
# to the just-reset $cmds.
eval cmds=\"\$cmds~\$RM $delfiles\"
which will remove the linker script file.
Appended is the current version of the patch.
Thanks, David
* config/ltmain.m4sh (func_mode_link): If command exceeds
max_cmd_len and file_list_spec exists, write list of input files
to temporary file.
* m4/libtool.m4 (_LT_LINKER_SHLIBS, aix[45]): Define file_list_spec.
(_LT_LANG_CXX_CONFIG, aix[45]): Define file_list_spec.
Index: config/ltmain.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/ltmain.m4sh,v
retrieving revision 1.60
diff -c -p -r1.60 ltmain.m4sh
*** config/ltmain.m4sh 7 Apr 2005 17:58:26 -0000 1.60
--- config/ltmain.m4sh 14 Apr 2005 14:57:15 -0000
*************** EOF
*** 5124,5134 ****
output=${output_objdir}/${output_la}.lnkscript
func_echo "creating GNU ld script: $output"
$ECHO 'INPUT (' > $output
! for obj in $save_libobjs
! do
! $ECHO \""$obj"\" >> $output
! done
$ECHO ')' >> $output
else
func_echo "creating reloadable object files..."
output=$output_objdir/$output_la-${k}.$objext
--- 5124,5138 ----
output=${output_objdir}/${output_la}.lnkscript
func_echo "creating GNU ld script: $output"
$ECHO 'INPUT (' > $output
! $ECHO "X$save_libobjs" | $Xsed | $SP2NL > $output
$ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test "X$skipped_export" != "X:" && test "X$file_list_spec" != X;
then
+ output=${output_objdir}/${output_la}.lnk
+ func_echo "creating linker input file list: $output"
+ $ECHO "X$save_libobjs" | $Xsed | $SP2NL > $output
+ delfiles="$delfiles $output"
+ output=\"$file_list_spec$filelist\"
else
func_echo "creating reloadable object files..."
output=$output_objdir/$output_la-${k}.$objext
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.181
diff -c -p -r1.181 libtool.m4
*** m4/libtool.m4 12 Apr 2005 17:28:48 -0000 1.181
--- m4/libtool.m4 13 Apr 2005 18:36:17 -0000
*************** _LT_EOF
*** 3838,3843 ****
--- 3838,3844 ----
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
if test "$GCC" = yes; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
*************** if test "$_lt_caught_CXX_error" != yes;
*** 4808,4813 ****
--- 4809,4815 ----
_LT_TAGVAR(hardcode_direct, $1)=yes
_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
_LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
if test "$GXX" = yes; then
case $host_os in aix4.[[012]]|aix4.[[012]].*)
- Re: [patch] list of input files if max_cmd_len exceeded, (continued)
- Re: [patch] list of input files if max_cmd_len exceeded, David Edelsohn, 2005/04/13
- Re: [patch] list of input files if max_cmd_len exceeded, Ralf Wildenhues, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, Peter O'Gorman, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, Ralf Wildenhues, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, Ralf Wildenhues, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, David Edelsohn, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, Peter O'Gorman, 2005/04/19
- Re: [patch] list of input files if max_cmd_len exceeded, David Edelsohn, 2005/04/22
- Re: [patch] list of input files if max_cmd_len exceeded, David Edelsohn, 2005/04/22
- FYI: [patch] list of input files if max_cmd_len exceeded, Ralf Wildenhues, 2005/04/25
- Re: [patch] list of input files if max_cmd_len exceeded,
David Edelsohn <=
- Re: [patch] list of input files if max_cmd_len exceeded, Ralf Wildenhues, 2005/04/14
- Re: [patch] list of input files if max_cmd_len exceeded, David Edelsohn, 2005/04/14