This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: MIPS: should -funwind-tables option be made default one on MIPS
- From: Ian Lance Taylor <iant at google dot com>
- To: Manjunath Matti <manjunath81 at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 13 Mar 2012 14:10:44 -0700
- Subject: Re: MIPS: should -funwind-tables option be made default one on MIPS
- References: <CAJ_i-r+98gY28PzJiw4-d4D53g5rE01a+iSM4Zsx4RoPWu4WGA@mail.gmail.com>
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