This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
[Fwd: PATCH: Response file support]
- From: Ranjit Mathew <rmathew at gmail dot com>
- To: java at gcc dot gnu dot org
- Date: Thu, 24 Nov 2005 11:55:10 +0530
- Subject: [Fwd: PATCH: Response file support]
- Openpgp: url=http://ranjitmathew.hostingzero.com/aa_6C114B8F.txt
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
FYI.
The GCC driver on mainline (to-be-4.2), now accepts
"@foo"-style arguments on the command line, primarily
to accommodate command line length restrictions on
some systems. This supersedes the @file support in
GCJ and accepts basically anything that can be
specified on the command line (and not just input
files).
I think this makes the @file support code in GCJ
dead-code.
Thanks,
Ranjit.
- -------- Original Message --------
Subject: PATCH: Response file support
Date: Wed, 23 Nov 2005 10:13:42 -0800
From: Mark Mitchell <mark@codesourcery.com>
Reply-To: mark@codesourcery.com
Newsgroups: gmane.comp.gcc.patches
This patch uses the new libiberty expandargv API in the compiler
driver.
So, now:
gcc @foo -o bar
reads additional command-line options from "foo". This functionality
has been in binutils for a while now. Windows users need this
behavior because of command-line length limits, and users on other
systems may find it useful as well. As previously agreed, if there is
no file named "foo" then the "@foo" option is still interpreted
literally.
Tested on x86_64-unknown-linux-gnu, in the usual way, by playing with
various response files, and by looking at the generated manual pages
and info documentation.
Applied to mainline.
- --
Mark Mitchell
CodeSourcery, LLC
mark@codesourcery.com
2005-11-23 Mark Mitchell <mark@codesourcery.com>
* doc/invoke.texi: For man pages, include gcc-vers.texi.
List @file in the option summary. Include the libiberty
documentation for @file.
* gcc.c (main): Call expandargv.
* Makefile.in (gcc-vers.texi): Define srcdir.
Index: doc/invoke.texi
===================================================================
- --- doc/invoke.texi (revision 107400)
+++ doc/invoke.texi (working copy)
@@ -4,6 +4,10 @@
@c For copying conditions, see the file gcc.texi.
@ignore
+@c man begin INCLUDE
+@include gcc-vers.texi
+@c man end
+
@c man begin COPYRIGHT
Copyright @copyright{} 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
@@ -36,7 +40,7 @@ gcc [@option{-c}|@option{-S}|@option{-E}
[@option{-I}@var{dir}@dots{}] [@option{-L}@var{dir}@dots{}]
[@option{-D}@var{macro}[=@var{defn}]@dots{}] [@option{-U}@var{macro}]
[@option{-f}@var{option}@dots{}] [@option{-m}@var{machine-option}@dots{}]
- - [@option{-o} @var{outfile}] @var{infile}@dots{}
+ [@option{-o} @var{outfile}] [@@@var{file}] @var{infile}@dots{}
Only the most useful options are listed here; see below for the
remainder. @samp{g++} accepts mostly the same options as @samp{gcc}.
@@ -156,7 +160,7 @@ in the following sections.
@item Overall Options
@xref{Overall Options,,Options Controlling the Kind of Output}.
@gccoptlist{-c -S -E -o @var{file} -combine -pipe -pass-exit-codes @gol
- --x @var{language} -v -### --help --target-help --version}
+-x @var{language} -v -### --help --target-help --version @@@var{file}}
@item C Language Options
@xref{C Dialect Options,,Options Controlling C Dialect}.
@@ -1049,6 +1053,8 @@ line options for each tool.
@item --version
@opindex version
Display the version number and copyrights of the invoked GCC@.
+
+@include @value{srcdir}/../libiberty/at-file.texi
@end table
@node Invoking G++
Index: gcc.c
===================================================================
- --- gcc.c (revision 107400)
+++ gcc.c (working copy)
@@ -6032,6 +6032,8 @@ main (int argc, const char **argv)
xmalloc_set_program_name (programname);
+ expandargv (&argc, &argv);
+
#ifdef GCC_DRIVER_HOST_INITIALIZATION
/* Perform host dependent initialization when needed. */
GCC_DRIVER_HOST_INITIALIZATION;
Index: Makefile.in
===================================================================
- --- Makefile.in (revision 107400)
+++ Makefile.in (working copy)
@@ -3320,6 +3320,7 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE)
then echo "@set DEVELOPMENT"; \
else echo "@clear DEVELOPMENT"; \
fi) > $@T
+ echo "@set srcdir $(srcdir)" >> $@T
mv -f $@T $@
- --
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.hostingzero.com/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDhVzGYb1hx2wRS48RAsXrAJ9z8391CAPsKpfJf9HKBPvgzhd6HQCfQxzx
4xw79SknTrFDGI3gzlaj0k8=
=5czC
-----END PGP SIGNATURE-----