On Friday 27 February 2009 17:13:06 Mike Frysinger wrote:
> On Friday 27 February 2009 05:34:08 Michal Simek wrote:
> > I am getting this error. I haven't read VHDL microblaze code but I
> > believe that we don't hyperthreading
> > and I hope that a lot of cpu don't have it too. It is x86 specific test
> > and there is arch x86 asm code.
> > There should be any arch conditional compilation.
> > For my case when I cross compile for different arch compilation failed.
> >
> > Any idea how to fix it?
>
> we address this by adding #ifdef checks to the source:
> #if defined(__i386__)
> ... test ...
> #else
> int main() { puts("test is not supported on your arch"); }
> #endif
I think this would be an overkill. In fact, there is conditional compilation in
the code right now - it only doesn't work when cross-compiling. See:
inline void cpuid(int op, int *eax, int *ebx, int *ecx, int *edx)
{
#ifndef ARCH_i386
return;
#else
__asm__("cpuid"
and ARCH_i386 comes from here:
OSV := $(shell uname -m|grep i[3-6]86)
ifeq (,$(OSV))
else
export CFLAGS+= -DARCH_i386
endif
So it should probably be sufficient to replace ARCH_i386 with __i386__. Hope
that works when cross-compiling, although I had never tried it.
Regards
Jiri Palecek
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list