public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle
@ 2011-01-12 15:45 howarth at nitro dot med.uc.edu
  2011-01-13  5:46 ` [Bug target/47269] " howarth at nitro dot med.uc.edu
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-01-12 15:45 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47269

           Summary: DSYMUTIL_SPEC doesn't handle -gtoggle
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: howarth@nitro.med.uc.edu


Currently on darwin, DSYMUTIL_SPEC is unaware of the -gtoggle flag. This
results in dsymutil not being called as expected when '-g0 -gtoggle' is passed
to the compiler despite any resulting object files containing the expected
DWARF debug information. It is unclear how we can code for this in
DSYMUTIL_SPEC since -gtoggle needs to invert the final accumulative setting of
-g.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/47269] DSYMUTIL_SPEC doesn't handle -gtoggle
  2011-01-12 15:45 [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle howarth at nitro dot med.uc.edu
@ 2011-01-13  5:46 ` howarth at nitro dot med.uc.edu
  2011-02-06  1:10 ` mikestump at comcast dot net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-01-13  5:46 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47269

--- Comment #1 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-01-13 05:23:00 UTC ---
This seems impossible to implement without the addition of a logical AND to the
spec language and the ability to place parentheses. We have two cases which
have to be tested as true...

(!g0 & !gtoggle) | (g0 & gtoggle)

in order to properly decided if -dsym should be passed.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/47269] DSYMUTIL_SPEC doesn't handle -gtoggle
  2011-01-12 15:45 [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle howarth at nitro dot med.uc.edu
  2011-01-13  5:46 ` [Bug target/47269] " howarth at nitro dot med.uc.edu
@ 2011-02-06  1:10 ` mikestump at comcast dot net
  2011-02-06  1:32 ` mikestump at comcast dot net
  2011-02-06  2:15 ` howarth at nitro dot med.uc.edu
  3 siblings, 0 replies; 5+ messages in thread
From: mikestump at comcast dot net @ 2011-02-06  1:10 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47269

--- Comment #2 from Mike Stump <mikestump at comcast dot net> 2011-02-06 01:10:06 UTC ---
Luckily specs can do this:

  %{!fdump=*:%{!fsyntax-only:foo}}

says to put in foo, if those two flags are not given; this is and.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/47269] DSYMUTIL_SPEC doesn't handle -gtoggle
  2011-01-12 15:45 [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle howarth at nitro dot med.uc.edu
  2011-01-13  5:46 ` [Bug target/47269] " howarth at nitro dot med.uc.edu
  2011-02-06  1:10 ` mikestump at comcast dot net
@ 2011-02-06  1:32 ` mikestump at comcast dot net
  2011-02-06  2:15 ` howarth at nitro dot med.uc.edu
  3 siblings, 0 replies; 5+ messages in thread
From: mikestump at comcast dot net @ 2011-02-06  1:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47269

--- Comment #3 from Mike Stump <mikestump at comcast dot net> 2011-02-06 01:31:52 UTC ---
If I understand what they intend, though, the documentation isn't clear on this
point:

%{!gtoggle:
  %{gdwarf-2:%{!gstabs*:%{!g0: -idsym}}}\                                       
      %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \                             
      %{gdwarf-2:%{!gstabs*:%{!g0: -dsym}}}}
}

%(gtoggle:
    %{!gdwarf-2:%{!gstabs*:%{!g0: -idsym}}}\                                    
      %{.c|.cc|.C|.cpp|.cp|.c++|.cxx|.CPP|.m|.mm: \                             
      %{!gdwarf-2:%{!gstabs*:%{!g0: -dsym}}}}
}

that said, I'd have the explain in detail exactly what happens with -g0 and
-gstabs.  You'd have to check to {} nesting to make sure I the } at the very
end is right.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/47269] DSYMUTIL_SPEC doesn't handle -gtoggle
  2011-01-12 15:45 [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle howarth at nitro dot med.uc.edu
                   ` (2 preceding siblings ...)
  2011-02-06  1:32 ` mikestump at comcast dot net
@ 2011-02-06  2:15 ` howarth at nitro dot med.uc.edu
  3 siblings, 0 replies; 5+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2011-02-06  2:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47269

--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> 2011-02-06 02:15:08 UTC ---
Mike,
   I thought it was pretty clear in the man page...

       -gtoggle
           Turn off generation of debug info, if leaving out this option would
           have generated it, or turn it on at level 2 otherwise.  The
           position of this argument in the command line does not matter, it
           takes effect after all other options are processed, and it does so
           only once, no matter how many times it is given.  This is mainly
           intended to be used with -fcompare-debug.

It inverts whatever the final status of debug code generation was. I think this
is why
you see it handled in toplev.c...

  if (flag_gtoggle)
    {
      if (debug_info_level == DINFO_LEVEL_NONE)
        {
          debug_info_level = DINFO_LEVEL_NORMAL;

          if (write_symbols == NO_DEBUG)
            write_symbols = PREFERRED_DEBUGGING_TYPE;
        }
      else
        debug_info_level = DINFO_LEVEL_NONE;
    }

rather than in opts.c.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-02-06  2:15 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 15:45 [Bug target/47269] New: DSYMUTIL_SPEC doesn't handle -gtoggle howarth at nitro dot med.uc.edu
2011-01-13  5:46 ` [Bug target/47269] " howarth at nitro dot med.uc.edu
2011-02-06  1:10 ` mikestump at comcast dot net
2011-02-06  1:32 ` mikestump at comcast dot net
2011-02-06  2:15 ` howarth at nitro dot med.uc.edu

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).