This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, libgfortran] Build with -ffunction-sections -fdata-sections



Hello,


Ulrich Weigand wrote:
most GCC target libraries are built with -ffunction-section -fdata-sections
if the compiler / target supports those options.  However, this is currently
not the case for libgfortran.  This makes the library more difficult to use
on targets like the SPU, where only static linking is supported and code space
is precious.

The following patch adds support for using -ffunction-sections -fdata-sections
to the libgfortran Makefiles, using code that is basically the same as in
libstdc++, libmudflap etc.

This brings done the minimal footprint of the Fortran library on SPU from
150 KB to about 40 KB, and in addition enables use of automatic overlay
support to run even programs making significant use of the library.

Doesn't this contradict the documentation which says:
"Only use these options when there are significant benefits from doing so. When you specify these options, the assembler and linker will create larger object and executable files and will also be slower. You will not be able to use gprof on all systems if you specify this option and you may have problems with debugging if you specify both this option and -g."


Cheers,
- Tobi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]