> I understand the reluctance to override the CFLAGS. But, as I have > discovered the -O2 flag is causing the trouble. Could anyone point out > to me how do I go about discovering the root cause?
You're asking the compiler to "pull out all the stops" to algorithmically optimize code the programmer clearly did not intend for such optimization. The programmer is [supposed to be] intelligent, the compiler is not. And, as I'm sure we've all seen, some programmers abuse the language trying to do their own "optimizations". That's why new version of the compiler sometimes will not work with some coding practices. For example, "Please note the warning under -fgcse about invoking -O2 on programs that use computed gotos." Optimizations, especially the higher levels, when they work, produce code that does not have a clear correspondance to the source code and is not debuggable. And sometimes they may produce code that fails at "edge conditions". In my opinion, they should be considered "the cherry on top". When the code is complex and not your own, the uncertainty of what got optimized how and where is not worth the generally minor speed benefits. I never add optimization options when building LFS unless the instructions say to. If the programmer knows it's OK and adds it to the makefile parameters, fine. I don't presume to know better, that it would work when (s)he didn't use it. -- Paul Rogers paulgrog...@fastmail.fm Rogers' Second Law: "Everything you do communicates." (I do not personally endorse any additions after this line. TANSTAAFL :-) -- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style