[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Our future compiler and default compile option problems.



This is not something that's critical at the moment, but we should
probably be thinking about it if there's any chance that we'll ever
switch to egcs as the default compiler.

It's also important if we'd like to support people who want to use
egcs as their local default.  The goal being that when they build
debian packages (or the kernel with make-kpkg), they get reasonable
compile flags.

[My understanding of this issue is not complete, so please correct me
if I'm getting things wrong. ]

The issue in this case is -fno-exceptions.  I've heard that people
have complained on the net about egcs, that even with it's haifa
scheduler, and all the new optimizations like -mpentium, etc., it was
building slower C binaries than g++.

The reason seemed to be that these people were not specifying
-fno-exceptions.  By default, egcs includes exception handling in C
binaries.  This is because you must, if you ever want to link the
resulting C object code against C++ object code and have exceptions
work.  Unfortunately, there's a non-trivial performance penalty.

Assuming that we plan to support egcs as the main compiler (which we
may not) what's the right thing to do?  If we make -fno-exceptions the
default, then it's my understanding that we won't be able to link the
resulting libs against C++ code that uses exceptions.  If we allow
exceptions, then we'll take a performance hit.

What's worse, gcc croaks on -fno-exceptions, so even if we wanted to
make it the default, we couldn't just specify it for both compilers.

-- 
Rob Browning <rlb@cs.utexas.edu>
PGP fingerprint = E8 0E 0D 04 F5 21 A0 94  53 2B 97 F5 D6 4E 39 30


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-devel-request@lists.debian.org . 
Trouble?  e-mail to templin@bucknell.edu .


Reply to: