Re: GSoC2007: cnst-sensors.2007-08-20.patch

From: Harald Schmalzbauer <h.schmalzbauer_at_omnisec.de>
Date: Sun, 26 Aug 2007 13:38:35 +0200
Am Sonntag, 26. August 2007 07:09:36 schrieb Constantine A. Murenin:
[...]
> > /usr/src/sys/modules/coretemp/../../dev/coretemp/coretemp.c:297: error:
> > SSE register return with SSE disabled
> > *** Error code 1
> > 1 error
>
> I cannot reproduce this bug on i386 with gcc 4.2.0 20070514, so this
> sounds like a bug in the compiler, either for allowing me to compile the
> code that shouldn't compile (and run flawlessly -- coretemp is totally
> tested here), or for not allowing you to compile the code that should
> compile. (I'll recompile my compiler tomorrow to catch up on the updates
> to gcc 4.2.1 to see if that changes anything.)
>
> Could you please provide more details, e.g. platform (I guess it is
> amd64?), compiler version and any changes you've made to the tree?

It's a core2 (E6420) machine, running amd64 -current from today (so gcc 4.2.1 
with default -O2).
In make.conf I have CPUTYPE?=core2, but removing the CPUTYPE doesn't make any 
difference, it fails exactly with the same error.
Makeoption is -j5 as it's a ULE kernel but that's completely irrelevant I 
think.

> This is the code that seems to generate this error with your compiler:
>
> 		s->value = temp * 1e6 + 273.15e6;
>
> Where s->value is of type int64_t, and temp is of type int.  Does anyone
> know if the e notation should not be used in this context?
>
> In the meantime, I assume that changing that line to:
>
> 		s->value = temp * 1000000 + 273150000;
>
> must solve the problem.

Right, kernel compiles fine now.

Thanks, -Harry
Received on Sun Aug 26 2007 - 09:37:55 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:16 UTC