From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu From: "Thomas Bushnell, BSG" Message-ID: <87ofi9h7zp.fsf@becket.becket.net> Content-Type: text/plain; charset=us-ascii References: <65cb447dbaf5f9da39d670e4f0596c79@plan9.bell-labs.com> Subject: Re: [9fans] GUI toolkit for Plan 9 Date: Thu, 28 Feb 2002 16:55:28 +0000 Topicbox-Message-UUID: 5c1e5a76-eaca-11e9-9e20-41e7f4b1d025 presotto@plan9.bell-labs.com writes: > I heard a rumor yesterday that I'ld like dispelled if > possible. It was that the Linux kernel had to be compiled > with optimization turned on to work. That has been true for some versions; it's a programmer bug. Specifically, there are certain kinds of inlining that happen only when optimizing, and Linux required those to occur. For example, in GCC, if you define a function like: extern inline foo (...) {...} Then you get a function which will be inlined (but generally only if optimization is turned on); if it's not inlined, then no code is output at all for the function. (You are supposed to link with a regular static version too.) Such "extern inline" declarations are normally put in header files. Linux had problems like these, where it was using such inlines, but didn't provide the static version. So when optimization is turned off, the inline doesn't happen, and you get an unresolvable external reference. There may have been other problems too. These are all in the category of programmer errors. Thomas