* Update of gcc/config/alpha/elf.h
@ 2002-09-02 21:34 Michael S. Zick
2002-09-03 2:32 ` Richard Henderson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michael S. Zick @ 2002-09-02 21:34 UTC (permalink / raw)
To: GCC
Cross compiler woes,
While tring to build for an Alpha target, using binutils-2.13, I found that the debug flags had changed.
Since other parts of the compiler need binutils-2.12++ I didn't try to conditionalize the change.
gcc/config/alpha/ChangeLog
* elf.h (ASM_SPEC): Update debug flags.
--- gcc/config/alpha/elf.h.old Mon Sep 2 23:12:00 2002
+++ gcc/config/alpha/elf.h.new Mon Sep 2 23:16:49 2002
@@ -39,7 +39,8 @@
#define CC1_SPEC "%{G*}"
#undef ASM_SPEC
-#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
+/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
+#define ASM_SPEC "%{G*} %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
#undef LINK_SPEC
#define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Update of gcc/config/alpha/elf.h
2002-09-02 21:34 Update of gcc/config/alpha/elf.h Michael S. Zick
@ 2002-09-03 2:32 ` Richard Henderson
2002-09-03 5:40 ` Michael S. Zick
2002-09-03 5:39 ` Michael S. Zick
2002-09-03 7:06 ` Peter Barada
2 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2002-09-03 2:32 UTC (permalink / raw)
To: Michael S. Zick; +Cc: GCC
On Mon, Sep 02, 2002 at 11:31:27PM -0500, Michael S. Zick wrote:
> -#define ASM_SPEC "%{G*} %{relax:-relax} %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}"
> +/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
> +#define ASM_SPEC "%{G*} %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
This doesn't do what you think it does. Using -mdebug is still correct.
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Update of gcc/config/alpha/elf.h
2002-09-02 21:34 Update of gcc/config/alpha/elf.h Michael S. Zick
2002-09-03 2:32 ` Richard Henderson
@ 2002-09-03 5:39 ` Michael S. Zick
2002-09-03 7:06 ` Peter Barada
2 siblings, 0 replies; 6+ messages in thread
From: Michael S. Zick @ 2002-09-03 5:39 UTC (permalink / raw)
To: GCC
On Monday 02 September 2002 11:31 pm, you wrote:
> Cross compiler woes,
> While tring to build for an Alpha target, using binutils-2.13, I found that
> the debug flags had changed. Since other parts of the compiler need
> binutils-2.12++ I didn't try to conditionalize the change.
>
> gcc/config/alpha/ChangeLog
> * elf.h (ASM_SPEC): Update debug flags.
>
> --- gcc/config/alpha/elf.h.old Mon Sep 2 23:12:00 2002
> +++ gcc/config/alpha/elf.h.new Mon Sep 2 23:16:49 2002
> @@ -39,7 +39,8 @@
> #define CC1_SPEC "%{G*}"
>
> #undef ASM_SPEC
> -#define ASM_SPEC "%{G*} %{relax:-relax}
> %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" +/* use new GNU-AS debug options
> - dwarf2 unless told otherwise. */ +#define ASM_SPEC "%{G*}
> %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
>
> #undef LINK_SPEC
> #define LINK_SPEC "-m elf64alpha %{G*} %{relax:-relax} \
In reply to my own suggestion (after a long nap)....
That isn't a very good idea.
Should handle all three cases: stabs, dwarf2, none.
Please hold the flames, I'll do better next time.
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Update of gcc/config/alpha/elf.h
2002-09-03 2:32 ` Richard Henderson
@ 2002-09-03 5:40 ` Michael S. Zick
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Zick @ 2002-09-03 5:40 UTC (permalink / raw)
To: Richard Henderson; +Cc: GCC
On Tuesday 03 September 2002 04:32 am, Richard Henderson wrote:
> On Mon, Sep 02, 2002 at 11:31:27PM -0500, Michael S. Zick wrote:
> > -#define ASM_SPEC "%{G*} %{relax:-relax}
> > %{!gstabs*:-no-mdebug}%{gstabs*:-mdebug}" +/* use new GNU-AS debug
> > options - dwarf2 unless told otherwise. */ +#define ASM_SPEC "%{G*}
> > %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
>
> This doesn't do what you think it does. Using -mdebug is still correct.
>
>
> r~
My mind translates that into: "Your problem lies higher up the food chain".
I.E: Closer to the source code.
That change did stop the passing of -no-mdebug (shown by gcc -v ) to the
assembler.
And I do agree with you, my mind wasn't giving the slightest thought to what
it does. I was only looking at the before and after result. Which I realize
can be mis-leading.
Backporting the change of Aug 29, 21:40:09 (shown as revision 1.63 in cvs) by
thorpej to the gcc-3.1.1 source also avoids the passing of -no-mdebug to the
assembler.
Sorry, did my testing before the back-porting. And never repeated the testing
AFTER I did the backport.
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Update of gcc/config/alpha/elf.h
2002-09-02 21:34 Update of gcc/config/alpha/elf.h Michael S. Zick
2002-09-03 2:32 ` Richard Henderson
2002-09-03 5:39 ` Michael S. Zick
@ 2002-09-03 7:06 ` Peter Barada
2002-09-03 7:35 ` Michael S. Zick
2 siblings, 1 reply; 6+ messages in thread
From: Peter Barada @ 2002-09-03 7:06 UTC (permalink / raw)
To: mszick; +Cc: gcc
>+/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
>+#define ASM_SPEC "%{G*} %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
You'll have a problem if someone specifies '-relax' since you didn't
leave a space to seperate it from the following options. The result
will be '-relax-gdwarf2' if -relax is specified and -gdwarf2 is not.
May I suggest:
+/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
+#define ASM_SPEC "%{G*} %{relax:-relax }%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs} "
--
Peter Barada Peter.Barada@motorola.com
Wizard 781-852-2768 (direct)
WaveMark Solutions(wholly owned by Motorola) 781-270-0193 (fax)
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Update of gcc/config/alpha/elf.h
2002-09-03 7:06 ` Peter Barada
@ 2002-09-03 7:35 ` Michael S. Zick
0 siblings, 0 replies; 6+ messages in thread
From: Michael S. Zick @ 2002-09-03 7:35 UTC (permalink / raw)
To: Peter Barada, mszick; +Cc: gcc
On Tuesday 03 September 2002 09:05 am, Peter Barada wrote:
> >+/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
> >+#define ASM_SPEC "%{G*}
> > %{relax:-relax}%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs}"
>
> You'll have a problem if someone specifies '-relax' since you didn't
> leave a space to seperate it from the following options. The result
> will be '-relax-gdwarf2' if -relax is specified and -gdwarf2 is not.
>
> May I suggest:
>
> +/* use new GNU-AS debug options - dwarf2 unless told otherwise. */
> +#define ASM_SPEC \
> "%{G*} %{relax:-relax }%{!gstabs*:-gdwarf2}%{gstabs*:-gstabs} "
Thanks,
The generation of -no-mdebug was being triggered by inconsistant
definitions in the configuration files concerning debugging. Fixed already
in releases more recent than gcc-3.1.1
Which raises another question in my mind...
Should there be (four? or more?) translations here to translate both old and
new debug options?
It is true that the compiler was issueing "WARNING" messages about the
redefinitions;
That wasn't immediately apparent as being the cause of
the compiler issueing an unrecognized debug option to the assembler;
after all, they where only WARNINGS. (They couldn't be anything else, the
compiler can't be expected to know what the side-effects of bad code is.)
I realized after I had sent the orginal post that I hadn't covered the "debug none"
case - My original post would pass -gdwarf2 unless stabs had been specified.
Well, I have to agree; my first suggestion stinks.
But perhaps there is something that should be done here.
Mike
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2002-09-03 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-09-02 21:34 Update of gcc/config/alpha/elf.h Michael S. Zick
2002-09-03 2:32 ` Richard Henderson
2002-09-03 5:40 ` Michael S. Zick
2002-09-03 5:39 ` Michael S. Zick
2002-09-03 7:06 ` Peter Barada
2002-09-03 7:35 ` Michael S. Zick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).