[PATCH] Backport input file to GCC libtool

Alexandre Oliva aoliva@redhat.com
Thu May 5 08:18:00 GMT 2005


On May  3, 2005, David Edelsohn <dje@watson.ibm.com> wrote:

> 	Okay for mainline and 4.0?

Sure, thanks!

> 	* ltconfig: Define file_list_spec.  Pass file_list_spec and
> 	with_gnu_ld to libtool.
> 	* ltcf-c.sh (aix[45]): Define file_list_spec.
> 	* ltcf-cxx.sh (aix[45]): Same.
> 	* ltcf-gcj.sh (aix[45]): Same.
> 	* ltmain.sh: If command exceeds max_cmd_len and file_list_spec
> 	exists, write list of input files to temporary file.

> ! 	  if test "$with_gnu_ld" = yes; then
> ! 	    output=${output_objdir}/${output_la}.lnkscript
> ! 	    $echo "creating GNU ld script: $output"
> ! 	    $echo 'INPUT (' > $output
> ! 	    for obj in $save_libobjs
> ! 	    do
> ! 	      $echo \""$obj"\" >> $output
> ! 	    done
> ! 	    $echo ')' >> $output
> ! 	    delfiles="$delfiles $output"

Although I must say I'm a bit concerned that this made to upstream
libtool, if it did.  Libtool is supposed to be far more careful about
special characters in filenames than GCC needs.  Consider, for
example, a filename containing a double quote.  The above will break
in this case, unless I'm missing some test elsewhere.  Filenames
containing blanks or line breaks are also a reason for concern,
although IIRC libtool already fails to handle line breaks properly in
some cases.

But this works for GCC and the rest of the src tree, so go for it.
Thanks,

-- 
Alexandre Oliva             http://www.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}



More information about the Gcc-patches mailing list