From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paul Mundt Date: Fri, 19 Mar 2010 11:27:35 +0000 Subject: Re: Complining with codesurgery 4.4.-43 sh2a Message-Id: <20100319112734.GG10003@linux-sh.org> List-Id: References: <201003191201.24090.fabio.giovagnini@aurion-tech.com> In-Reply-To: <201003191201.24090.fabio.giovagnini@aurion-tech.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: linux-sh@vger.kernel.org On Fri, Mar 19, 2010 at 12:01:23PM +0100, Fabio Giovagnini wrote: > Hi all, why I need to compile my code with -m2a -m2a-nofpu aven if sh2a 76203 > has an fpu? > If I do not use -m2a-nofpu I have error > undefined reference to `__fpscr_values' > at linking time > You should never be touching any of the Makefile build flags, they are delicate, have rigid ordering requirements, and are mapped out the way they are intentionally. Any time you are forced to hack up build flags you are almost guaranteed to be doing something wrong. Whether the CPU has an FPU or not is completely irrelevant from the context of the kernel. The kernel does not have its own FP state, and so can't handle having FP instructions generated by the compiler, this is what the -nofpu inhibiting is for. Even in situations where the kernel may wish to hand craft FP context and open code a few instructions, the kernel is never built without -nofpu.