public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* MIPS: should -funwind-tables option be made default one on MIPS
@ 2012-03-13  7:53 Manjunath Matti
  2012-03-13 21:11 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Manjunath Matti @ 2012-03-13  7:53 UTC (permalink / raw)
  To: gcc-help

Hi,

In glibc the following commit adds support for backtrace in MIPS port.
commit  04d450263622ae7c37cb841f93b3bcf4e9397a88

Link: http://repo.or.cz/w/glibc-ports.git/commit/04d450263622ae7c37cb841f93b3bcf4e9397a88

But during compilations of any program the user needs to provide/pass
-funwind-tables to GCC, to be able to do a backtrace.
I am proposing why not the option be made the default one! it would be
useful to all.
Please let me know if its ok, I have a patch which will enable
-funwind-tables as a default option.

Regards,
Manjunath S Matti.

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

* Re: MIPS: should -funwind-tables option be made default one on MIPS
  2012-03-13  7:53 MIPS: should -funwind-tables option be made default one on MIPS Manjunath Matti
@ 2012-03-13 21:11 ` Ian Lance Taylor
  2012-03-13 21:56   ` David Daney
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2012-03-13 21:11 UTC (permalink / raw)
  To: Manjunath Matti; +Cc: gcc-help

Manjunath Matti <manjunath81@gmail.com> writes:

> In glibc the following commit adds support for backtrace in MIPS port.
> commit  04d450263622ae7c37cb841f93b3bcf4e9397a88
>
> Link: http://repo.or.cz/w/glibc-ports.git/commit/04d450263622ae7c37cb841f93b3bcf4e9397a88
>
> But during compilations of any program the user needs to provide/pass
> -funwind-tables to GCC, to be able to do a backtrace.
> I am proposing why not the option be made the default one! it would be
> useful to all.
> Please let me know if its ok, I have a patch which will enable
> -funwind-tables as a default option.

The -funwind-tables option takes up space in the program.  That is
undesirable for programs running on embedded systems that do not need to
call backtrace or throw exceptions.  Given this, each programmer has to
decide whether to use the option, and GCC has to pick a sensible
default.  The default GCC has chosen is to turn off -funwind-tables
unless the language requires it (e.g., C++, Java, Go) or the processor
ABI requires it (x86_64).

You are proposing to change the default for MIPS.  That would not be the
normal default for GCC.  However, it's fine by me if the MIPS
maintainers want to make that change.  Those are the people you have to
convince.  Search for "mips" in the top-level MAINTAINERS file in the
gcc source code.

Ian

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

* Re: MIPS: should -funwind-tables option be made default one on MIPS
  2012-03-13 21:11 ` Ian Lance Taylor
@ 2012-03-13 21:56   ` David Daney
  0 siblings, 0 replies; 3+ messages in thread
From: David Daney @ 2012-03-13 21:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: Manjunath Matti, gcc-help

On 03/13/2012 02:10 PM, Ian Lance Taylor wrote:
> Manjunath Matti<manjunath81@gmail.com>  writes:
>
>> In glibc the following commit adds support for backtrace in MIPS port.
>> commit  04d450263622ae7c37cb841f93b3bcf4e9397a88
>>
>> Link: http://repo.or.cz/w/glibc-ports.git/commit/04d450263622ae7c37cb841f93b3bcf4e9397a88
>>
>> But during compilations of any program the user needs to provide/pass
>> -funwind-tables to GCC, to be able to do a backtrace.
>> I am proposing why not the option be made the default one! it would be
>> useful to all.
>> Please let me know if its ok, I have a patch which will enable
>> -funwind-tables as a default option.
>
> The -funwind-tables option takes up space in the program.  That is
> undesirable for programs running on embedded systems that do not need to
> call backtrace or throw exceptions.  Given this, each programmer has to
> decide whether to use the option, and GCC has to pick a sensible
> default.  The default GCC has chosen is to turn off -funwind-tables
> unless the language requires it (e.g., C++, Java, Go) or the processor
> ABI requires it (x86_64).
>
> You are proposing to change the default for MIPS.  That would not be the
> normal default for GCC.  However, it's fine by me if the MIPS
> maintainers want to make that change.  Those are the people you have to
> convince.  Search for "mips" in the top-level MAINTAINERS file in the
> gcc source code.
>

I am not a maintainer, but I suspect that we don't want to do this just yet.

A lot of mips code is run on resource constrained systems, where this 
will not be welcome.

mips64 on the other hand might be a different question, although there 
is a lot of legacy code out there that doesn't do it, so you might still 
end up with a broken backtrace().

But really how hard is it to manually supply -funwind-tables for objects 
that you care about?

David Daney

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

end of thread, other threads:[~2012-03-13 21:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-13  7:53 MIPS: should -funwind-tables option be made default one on MIPS Manjunath Matti
2012-03-13 21:11 ` Ian Lance Taylor
2012-03-13 21:56   ` David Daney

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