This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


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: -ffunction-sections -fdata-sections have no effect


On Wednesday 18 October 2006 11:29, Brian Dessent wrote:
> Valentin Longchamp wrote:
> > > EXTRA_TARGET_CFLAGS="-mabi=aapcs-linux -ffunction-section
> > > -fdata-section" export EXTRA_TARGET_CFLAGS
> >
> > However, using this, I get segfaulting binaries. Where should I add these
> > options so that my glibc is built with these options ? Maybe I should add
> > it to the GLIBC_EXTRA_CONFIG variable ?
>
> I think you've got a typo there, they should be plural
> (-ffunction-sections and -fdata-sections.)  See
> <http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-ffunction_00
>2dsections-582>.

Yeah you're right. I've a typo. But only in the email, I made the typo when 
rewriting the config option in the email, I just checked the my crosstool 
config script and it is correct. It would have been sooo cool that it only 
wasn't a typo.

>
> You might also consider trying a different C library like uClibc if
> final binary size is a concern, given that glibc is not exactly designed
> for this use case and has tons of inter-dependencies that can cause all
> sorts of stuff to be pulled in even for the most trivial program.
>

Yes, it is something we are considering too. We have to see how is the support 
for our vfp ARM11 processor, but if it is well supported, it's going to be 
much better than the huge glibc for our embedded system for sure. Thanks for 
the hint !

Valentin

Attachment: pgp00000.pgp
Description: PGP signature


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