* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
@ 2007-03-25 22:33 ` pinskia at gcc dot gnu dot org
2007-03-25 23:21 ` brooks at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-03-25 22:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-03-26 00:33 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nickc at redhat dot com
Status|UNCONFIRMED |NEW
Component|other |driver
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-03-25 23:33:06
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
2007-03-25 22:33 ` [Bug driver/31353] " pinskia at gcc dot gnu dot org
@ 2007-03-25 23:21 ` brooks at gcc dot gnu dot org
2007-03-28 10:38 ` nickc at redhat dot com
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-03-25 23:21 UTC (permalink / raw)
To: gcc-bugs
--
brooks at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |brooks at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2007-03-25 23:33:06 |2007-03-26 00:21:14
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
2007-03-25 22:33 ` [Bug driver/31353] " pinskia at gcc dot gnu dot org
2007-03-25 23:21 ` brooks at gcc dot gnu dot org
@ 2007-03-28 10:38 ` nickc at redhat dot com
2007-03-28 18:17 ` brooks at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: nickc at redhat dot com @ 2007-03-28 10:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from nickc at redhat dot com 2007-03-28 11:38 -------
Subject: Re: gcc --help=target gives a linker error.
Hi Brooks,
I have a patch to fix this problem (attached). Unfortunately due to
an internal bugzilla error I cannot (currently) upload the patch to this PR.
Cheers
Nick
gcc/ChangeLog
2007-03-28 Nick Clifton <nickc@redhat.com>
PR driver/31353
* gcc.c (process_command): Pass --help= switch on to
pre-processor, assembler and linker sub-processes.
Index: gcc/gcc.c
===================================================================
--- gcc/gcc.c (revision 123290)
+++ gcc/gcc.c (working copy)
@@ -3607,11 +3607,26 @@ warranty; not even for MERCHANTABILITY o
else if (strncmp (argv[i], "-fhelp=", 7) == 0)
{
/* translate_options () has turned --help into -fhelp. */
- print_subprocess_help = 2;
+ print_subprocess_help = 1;
/* We will be passing a dummy file on to the sub-processes. */
n_infiles++;
n_switches++;
+
+ if (strcmp (argv[i] + 7, "target") == 0)
+ {
+ if (is_cpp_driver)
+ add_preprocessor_option ("--target-help", 13);
+ add_assembler_option ("--target-help", 13);
+ add_linker_option ("--target-help", 13);
+ }
+ else
+ {
+ if (is_cpp_driver)
+ add_preprocessor_option ("--help", 6);
+ add_assembler_option ("--help", 6);
+ add_linker_option ("--help", 6);
+ }
}
else if (strcmp (argv[i], "-ftarget-help") == 0)
{
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-03-28 10:38 ` nickc at redhat dot com
@ 2007-03-28 18:17 ` brooks at gcc dot gnu dot org
2007-03-29 10:06 ` nickc at redhat dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-03-28 18:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from brooks at gcc dot gnu dot org 2007-03-28 19:17 -------
I had previously posted a patch to fix this, as well, but apparently the patch
tracker didn't pick up on it to attach it to the PR:
http://gcc.gnu.org/ml/gcc-patches/2007-03/msg01658.html
As mentioned on the patches list, I don't think that passing --help along to
the subprocesses is the right thing to do here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-03-28 18:17 ` brooks at gcc dot gnu dot org
@ 2007-03-29 10:06 ` nickc at redhat dot com
2007-04-04 18:10 ` brooks at gcc dot gnu dot org
2007-04-04 18:24 ` brooks at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: nickc at redhat dot com @ 2007-03-29 10:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from nickc at redhat dot com 2007-03-29 11:05 -------
Brooks' patch is better than mine, so I would recommend that it be adopted.
Cheers
Nick
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-03-29 10:06 ` nickc at redhat dot com
@ 2007-04-04 18:10 ` brooks at gcc dot gnu dot org
2007-04-04 18:24 ` brooks at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-04-04 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from brooks at gcc dot gnu dot org 2007-04-04 19:10 -------
Subject: Bug 31353
Author: brooks
Date: Wed Apr 4 19:10:17 2007
New Revision: 123498
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123498
Log:
PR other/31353
* gcc.c (main): Do not run the linker if
print_subprocess_help indicates that it shouldn't be
run.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/gcc.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug driver/31353] gcc --help=target gives a linker error.
2007-03-25 22:21 [Bug other/31353] New: gcc --help=target gives a linker error brooks at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-04-04 18:10 ` brooks at gcc dot gnu dot org
@ 2007-04-04 18:24 ` brooks at gcc dot gnu dot org
6 siblings, 0 replies; 8+ messages in thread
From: brooks at gcc dot gnu dot org @ 2007-04-04 18:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from brooks at gcc dot gnu dot org 2007-04-04 19:24 -------
Fixed, as per the above commit.
--
brooks at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31353
^ permalink raw reply [flat|nested] 8+ messages in thread