I'm sending this here to -devel because I haven't gotten any answers on
-users and it seems like it might be more related to development of the
code. For reference, my problem with cpu_accel was that I would get this
when I tried to compile it:

[...]
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../include -I../../src
-D_REENTRANT
-Wall -O3 -pipe -DFUSION_FAKE -Werror-implicit-function-declarations -MT
cpu_accel.lo -MD -MP -MF .deps/cpu_accel.Tpo -c cpu_accel.c  -fPIC -o
.libs/cpu_accel.o
cpu_accel.c: In function `arch_accel':
cpu_accel.c:108: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:114: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:127: can't find a register in class `BREG' while reloading `asm'
cpu_accel.c:131: can't find a register in class `BREG' while reloading `asm'
make[3]: *** [cpu_accel.lo] Error 1
make[3]: Leaving directory
`/site/home/eric/src/cvs/directfb/DirectFB/src/misc'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/site/home/eric/src/cvs/directfb/DirectFB/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/site/home/eric/src/cvs/directfb/DirectFB'
make: *** [all] Error 2


On Fri, May 30, 2003 at 12:19:52PM +0200, Sven Neumann wrote:
> Hi,
> 
> Eric Christopherson <[EMAIL PROTECTED]> writes:
> 
> > Are others able to build cpu_accel.c? Is there a way to just disable
> > this part of the build?
> 
> I just checked and I had no problem to compile DirectFB from CVS on
> debian testing. As far as I know, Dok is using debian unstable, so it
> should compile there as well.
>
> You can disable most of the code in cpu_accel.h by calling configure
> with --disable-sse or even --disable-mmx.

Disabling both of them did it for me. Not content with that, however, I
did a web search of the insidious error message "can't find a register in
class `BREG' while reloading `asm'." It appears that this message means that
%ebx is listed as an output (or otherwise gets clobbered), which is not
permissible in PIC code. So I had a hunch that PIC was undefined as far as
cpp was concerned, which made cpp define cpuid in its not-PIC form instead
of its PIC form. So, I just added "#define PIC" above the check and
definition of cpuid, and sure enough it compiled without complaints then.

The question is: why isn't the variable PIC defined? Should it be defined
automatically by the compiler whenever -fPIC is included, or does it need to
be defined in a header or makefile or something?

-- 
Furrfu!         r a k k o  at  c h a r t e r  dot  n e t


-- 
Info:  To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-dev" as subject.

Reply via email to