you are right I was a moron, I added the -fpic to a variable that is used in debug by make
I added the common option variable now and I get the error I told you about, that only happens in 32 bit
here is is
gcc -c -Wall -Wno-strict-aliasing -D_LINUX_VER -O2 -msse -fPIC -msse2 -ffloat-store -ffast-math -freciprocal-math -funsafe-math-optimizations -fsingle-precision-constant -Idg -Iphysics -o dg/dgTypes.o dg/dgTypes.cpp
dg/dgTypes.cpp: In function ‘dgCpuClass dgGetCpuType()’:
dg/dgTypes.cpp:301: error: can't find a register in class ‘BREG’ while reloading ‘asm’
dg/dgTypes.cpp:301: error: ‘asm’ operand has impossible constraints
make: *** [dg/dgTypes.o] Error 1
julio@julio-desktop:~/Desktop/NewtonLinux32/development$
the function that is trying to compiled is this
- Code: Select all
#if (defined (_LINUX_VER) || defined (_MINGW_32_VER) || defined (_MINGW_64_VER))
#define cpuid(func,ax,bx,cx,dx)\
__asm__ __volatile__ ("cpuid":\
"=a" (ax), "=b" (bx), "=c" (cx), "=d" (dx) : "a" (func));
static dgInt32 i386_cpuid(void)
{
int a, b, c, d;
cpuid(1,a,b,c,d);
return d;
}
dgCpuClass dgApi dgGetCpuType ()
{
#define bit_MMX (1 << 23)
#define bit_SSE (1 << 25)
#define bit_SSE2 (1 << 26)
#ifndef __USE_DOUBLE_PRECISION__
if (i386_cpuid() & bit_SSE) {
return dgSimdPresent;
}
#endif
return dgNoSimdPresent;
}
#endif
it is important for PC users in 32 bit mode, because there are some Newton users who still run Newton in machines that do not have SSE instructions but that are still good CPU like the AMD athloms.
if you can tell me how to get rid of the asm instruction to detect SSE support then it will work, but I could not find out in Linux.
somehow that function compile fine with GCC 4.3.3 in 64 bit mode.
one solution could be to remove the SSE in linux, I like that but unfortunatly
that will cripple the SSE mode which in 32 bit is a significant improvement in all OS, specially with people using Intel dual cores.