Skip to contentSkip to conversation

Build error in Android/x86

DISCUSSION Aaron Carroll 2 participants 2 messages Mar 15, 2013

lore
Share & tools
lore
#0 lore raw

I'm trying to build FIO with an Android/x86 cross compiler:

make CROSS_COMPILE=~/dev/android-toolchains-r8c/x86-4.6/bin/i686-linux-android-

but get the following error:

arch/arch-x86-common.h:9:2: error: inconsistent operand constraints in an 'asm'

which is complaining about this function:

  static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
                  unsigned int *ecx, unsigned int *edx)
  {
      asm volatile("cpuid"
          : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
          : "0" (*eax), "2" (*ecx)
          : "memory");
  }

Unfortunately I don't do x86 ASM. I'm wondering if this is a genuine error, or if something has broken in the cross compile.

Cheers,
-- Aaron

#1 lore raw
Quoted 19 lines · Aaron Carroll

I'm trying to build FIO with an Android/x86 cross compiler:

make CROSS_COMPILE=~/dev/android-toolchains-r8c/x86-4.6/bin/i686-linux-android-

but get the following error:

arch/arch-x86-common.h:9:2: error: inconsistent operand constraints in an 'asm'

which is complaining about this function:

  static inline void do_cpuid(unsigned int *eax, unsigned int *ebx,
                  unsigned int *ecx, unsigned int *edx)
  {
      asm volatile("cpuid"
          : "=a" (*eax), "=b" (*ebx), "=c" (*ecx), "=d" (*edx)
          : "0" (*eax), "2" (*ecx)
          : "memory");
  }
Quoted 2 lines

Unfortunately I don't do x86 ASM. I'm wondering if this is a genuine error, or if something has broken in the cross compile.

Hmm, I wonder why it complains about that, looks legit to me... Maybe it's the ecx being both input and output it doesn't like?

Signature · 1 line
Jens Axboe