Steve Youngs <youngs(a)xemacs.org> wrote:
|--==> "JJ" == Jerry James <james(a)xemacs.org>
writes:
JJ> Using any optimization setting at all causes it to link correctly. So
JJ> now the question becomes whether we should try to work around this bug
JJ> or not, and if so, how.
Is the optimisation only needed with '--error-checking=all' (on gcc)?
Yes, due to the #ifdef ... #endif surrounding the "extern inline"
function in question.
What consequences will arise from unconditionally turning on say
'-O1'
if '--error-checking=all'? Would backtraces be affected
detrimentally?
I don't really know. Optimization can do funny things to control flow,
but just -O1 will not inline any non-extern inline functions, so the
backtrace should be the same. I think.
If nothing's likely to blow up in our face I'd suggest if
anyone uses
'--error-checking=all' then add '-O1' to the new cflags_warnings.
That way it won't be overridden by someone's $CFLAGS if they have it
set. What do you think?
I hate to force a bug workaround on everybody, whether they are using a
system with the bug or not. I kind of think we should leave things the
way they are and ...
In any event, it would probably be a good idea to add an entry to
PROBLEMS.
... do this. "If you get an undefined symbol error when loading a
module, then recompile with -O1 to work around a gcc bug." Also, note
that compiling the module code with -O1 is sufficient; you don't need to
compile all of XEmacs that way.
If this is acceptable, I'll submit a patch against PROBLEMS.
--
Jerry James
http://www.ittc.ku.edu/~james/