On Wed, May 16, 2018 at 03:26:53PM -0700, Paul Rogers wrote: > > 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." >
Paul, whilst I agree that increasing optimization does sometimes lead to problems, I think you are perhaps missing something important: the flags used by the package developer. In the case of tcl, the default CFLAGS it uses start with -O2. From the OP's report, this package does respect any CFLAGS passed to it, so what (s)he was doing is *reducing* the optimization. ĸen -- This email was written using 100% recycled letters. -- 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