source:
scripts/untested/blfs-patches/esound-0.2.35-libtool_skip_max_cmd_len-1.patch@
8c8c5ab
Last change on this file since 8c8c5ab was fd5b1fe, checked in by , 19 years ago | |
---|---|
|
|
File size: 6.2 KB |
-
esound-0.2.
old new 4057 4057 fi 4058 4058 fi 4059 4059 4060 if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*"` &&4061 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then4062 :4063 else4064 # The command line is too long to link in one step, link piecewise.4065 $echo "creating reloadable object files..."4066 4067 # Save the value of $output and $libobjs because we want to4068 # use them later. If we have whole_archive_flag_spec, we4069 # want to use save_libobjs as it was before4070 # whole_archive_flag_spec was expanded, because we can't4071 # assume the linker understands whole_archive_flag_spec.4072 # This may have to be revisited, in case too many4073 # convenience libraries get linked in and end up exceeding4074 # the spec.4075 if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then4076 save_libobjs=$libobjs4077 fi4078 save_output=$output4079 4080 # Clear the reloadable object creation command queue and4081 # initialize k to one.4082 test_cmds=4083 concat_cmds=4084 objlist=4085 delfiles=4086 last_robj=4087 k=14088 output=$output_objdir/$save_output-${k}.$objext4089 # Loop over the list of objects to be linked.4090 for obj in $save_libobjs4091 do4092 eval test_cmds=\"$reload_cmds $objlist $last_robj\"4093 if test "X$objlist" = X ||4094 { len=`expr "X$test_cmds" : ".*"` &&4095 test "$len" -le "$max_cmd_len"; }; then4096 objlist="$objlist $obj"4097 else4098 # The command $test_cmds is almost too long, add a4099 # command to the queue.4100 if test "$k" -eq 1 ; then4101 # The first file doesn't have a previous command to add.4102 eval concat_cmds=\"$reload_cmds $objlist $last_robj\"4103 else4104 # All subsequent reloadable object files will link in4105 # the last one created.4106 eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\"4107 fi4108 last_robj=$output_objdir/$save_output-${k}.$objext4109 k=`expr $k + 1`4110 output=$output_objdir/$save_output-${k}.$objext4111 objlist=$obj4112 len=14113 fi4114 done4115 # Handle the remaining objects by creating one last4116 # reloadable object file. All subsequent reloadable object4117 # files will link in the last one created.4118 test -z "$concat_cmds" || concat_cmds=$concat_cmds~4119 eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"4120 4121 if ${skipped_export-false}; then4122 $show "generating symbol list for \`$libname.la'"4123 export_symbols="$output_objdir/$libname.exp"4124 $run $rm $export_symbols4125 libobjs=$output4126 # Append the command to create the export file.4127 eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\"4128 fi4129 4130 # Set up a command to remove the reloadale object files4131 # after they are used.4132 i=04133 while test "$i" -lt "$k"4134 do4135 i=`expr $i + 1`4136 delfiles="$delfiles $output_objdir/$save_output-${i}.$objext"4137 done4138 4139 $echo "creating a temporary reloadable object file: $output"4140 4141 # Loop through the commands generated above and execute them.4142 save_ifs="$IFS"; IFS='~'4143 for cmd in $concat_cmds; do4144 IFS="$save_ifs"4145 $show "$cmd"4146 $run eval "$cmd" || exit $?4147 done4148 IFS="$save_ifs"4149 4150 libobjs=$output4151 # Restore the value of output.4152 output=$save_output4153 4154 if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then4155 eval libobjs=\"\$libobjs $whole_archive_flag_spec\"4156 fi4157 # Expand the library linking commands again to reset the4158 # value of $libobjs for piecewise linking.4159 4160 # Do each of the archive commands.4161 if test "$module" = yes && test -n "$module_cmds" ; then4162 if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then4163 cmds=$module_expsym_cmds4164 else4165 cmds=$module_cmds4166 fi4167 else4168 if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then4169 cmds=$archive_expsym_cmds4170 else4171 cmds=$archive_cmds4172 fi4173 fi4174 4175 # Append the command to remove the reloadable object files4176 # to the just-reset $cmds.4177 eval cmds=\"\$cmds~\$rm $delfiles\"4178 fi4179 4060 save_ifs="$IFS"; IFS='~' 4180 4061 for cmd in $cmds; do 4181 4062 IFS="$save_ifs" … … 5347 5228 else 5348 5229 eval cmds=\"$old_archive_cmds\" 5349 5230 5350 if len=`expr "X$cmds" : ".*"` && 5351 test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then 5352 cmds=$old_archive_cmds 5353 else 5354 # the command line is too long to link in one step, link in parts 5355 $echo "using piecewise archive linking..." 5356 save_RANLIB=$RANLIB 5357 RANLIB=: 5358 objlist= 5359 concat_cmds= 5360 save_oldobjs=$oldobjs 5361 # GNU ar 2.10+ was changed to match POSIX; thus no paths are 5362 # encoded into archives. This makes 'ar r' malfunction in 5363 # this piecewise linking case whenever conflicting object 5364 # names appear in distinct ar calls; check, warn and compensate. 5365 if (for obj in $save_oldobjs 5366 do 5367 $echo "X$obj" | $Xsed -e 's%^.*/%%' 5368 done | sort | sort -uc >/dev/null 2>&1); then 5369 : 5370 else 5371 $echo "$modename: warning: object name conflicts; overriding AR_FLAGS to 'cq'" 1>&2 5372 $echo "$modename: warning: to ensure that POSIX-compatible ar will work" 1>&2 5373 AR_FLAGS=cq 5374 fi 5375 # Is there a better way of finding the last object in the list? 5376 for obj in $save_oldobjs 5377 do 5378 last_oldobj=$obj 5379 done 5380 for obj in $save_oldobjs 5381 do 5382 oldobjs="$objlist $obj" 5383 objlist="$objlist $obj" 5384 eval test_cmds=\"$old_archive_cmds\" 5385 if len=`expr "X$test_cmds" : ".*"` && 5386 test "$len" -le "$max_cmd_len"; then 5387 : 5388 else 5389 # the above command should be used before it gets too long 5390 oldobjs=$objlist 5391 if test "$obj" = "$last_oldobj" ; then 5392 RANLIB=$save_RANLIB 5393 fi 5394 test -z "$concat_cmds" || concat_cmds=$concat_cmds~ 5395 eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" 5396 objlist= 5397 fi 5398 done 5399 RANLIB=$save_RANLIB 5400 oldobjs=$objlist 5401 if test "X$oldobjs" = "X" ; then 5402 eval cmds=\"\$concat_cmds\" 5403 else 5404 eval cmds=\"\$concat_cmds~\$old_archive_cmds\" 5405 fi 5406 fi 5231 cmds=$old_archive_cmds 5407 5232 fi 5408 5233 save_ifs="$IFS"; IFS='~' 5409 5234 for cmd in $cmds; do
Note:
See TracBrowser
for help on using the repository browser.