From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <50E17756.7030400@openwide.fr> Date: Mon, 31 Dec 2012 12:30:30 +0100 From: Romain Naour MIME-Version: 1.0 References: <50E062E8.6030903@openwide.fr> <50E0BD01.1020404@xenomai.org> In-Reply-To: <50E0BD01.1020404@xenomai.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Xenomai] Xenomai 2.6.2 user-space compilation error on ARM < armv6 List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai@xenomai.org Le 30/12/2012 23:15, Gilles Chanteperdrix a =C3=A9crit : > On 12/30/2012 04:51 PM, Romain Naour wrote: >=20 >> Hi Gilles, >> >> First of all, thank you for the new release of Xenomai :) >> >> I'm compiling Xenomai 2.6.2 and Linux kernel 3.5.3 for mini2440 with >> buildroot 2012.11. >> >> During compilation I get the following error: error: #error "SMP not >> supported below armv6, compile with -march=3Darmv6 or above" >> >> This error is caused by the SMP mode which is now enabled by default >> on ARM. So I added the option --disable-smp on the buildroot's >> command line for ./configure (buildroot assumes that the SMP mode is >> not enabled when it compile Xenomai for arm) >> >> This option became mandatory for ARM < armv6 to pass this test: >> (xenomai-2.6/include/asm-arm/feature.h) >> >> #if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) #error "SMP not >> supported below armv6, compile with -march=3Darmv6 or above" #endif >> >> The error message may be advisable to add the option --disable-smp ?=20 >> However, since your objective is to allow to run the same binary on >> UP and SMP system, it is safe to remove this test for ARM < armv6 now >> ? >=20 >=20 > Could you try the following patch? >=20 > diff --git a/include/asm-arm/atomic_asm.h b/include/asm-arm/atomic_asm.= h > index 47f17c9..ef62690 100644 > --- a/include/asm-arm/atomic_asm.h > +++ b/include/asm-arm/atomic_asm.h > @@ -27,6 +27,10 @@ > #error "please don't include asm/atomic_asm.h directly" > #endif > =20 > +#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) > +#error "SMP not supported below armv6 with ad-hoc atomic operations, c= ompile without SMP or with -march=3Darmv6 or above" > +#endif > + > extern void __xnarch_xchg_called_with_bad_pointer(void); > =20 > #define xnarch_read_memory_barrier() xnarch_memory_barrier() > diff --git a/include/asm-arm/features.h b/include/asm-arm/features.h > index 279f752..bddaa5e 100644 > --- a/include/asm-arm/features.h > +++ b/include/asm-arm/features.h > @@ -73,10 +73,6 @@ > #error "Could not find current ARM architecture" > #endif > =20 > -#if __LINUX_ARM_ARCH__ < 6 && defined(CONFIG_SMP) > -#error "SMP not supported below armv6, compile with -march=3Darmv6 or = above" > -#endif > - > #define CONFIG_XENO_FASTSYNCH 1 > =20 > #if CONFIG_XENO_ARM_TSC_TYPE =3D=3D __XN_TSC_TYPE_KUSER >=20 Hi Gilles, I applied your patch and tried to compile with the following options: --with-atomic-ops=3Dad-hoc As expected, the build fails with this error: #error "SMP not supported below armv6 with ad-hoc atomic operations, compile without SMP or with -march=3Darmv6 or above" --with-atomic-ops=3Dbuiltins (or when this option is not specified) The build ends correctly. I haven't the board at this time, I'll do a test this week. Regards, Romain