This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: i386 __atomic_compare_exchange_n not found
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: Deng Hengyi <wei dot a dot yang at gmail dot com>
- Cc: Jonathan Wakely <jwakely dot gcc at gmail dot com>, gcc <gcc at gcc dot gnu dot org>, Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- Date: Fri, 9 Aug 2013 11:02:57 -0500
- Subject: Re: i386 __atomic_compare_exchange_n not found
- References: <E56937CF-71B9-4174-8129-B258318A36A8 at gmail dot com> <CAH6eHdRJAbxhqzkxbC0uPyg29yecv3r8vq4277hSDP8z=h_EFw at mail dot gmail dot com> <C0E7F57A-AC3B-4A63-9230-88C927A2C4D2 at gmail dot com> <CAH6eHdTB_jDT_6V__pDP6YfKBRadgnrkiz=imwerodj5xETOaw at mail dot gmail dot com> <50EADE7C-2A5D-4109-8688-41CDF4D80998 at gmail dot com>
On 8/9/2013 10:15 AM, Deng Hengyi wrote:
> Hi all,
>
> does anyone know how to configure gcc to build with "__atomic_compare_exchange_n" support for i386 target?
I recall that one issue with *-rtems* targets is that
we support CPU models which are lower than typically
used on Linux and BSD systems. I recall that CPU
models like the mc68000 and i386 don't necessarily
have the atomic instructions available in later models
like the mc68040 or i686.
My suggestion is to see specifically how that is
implemented on the other CPU models and which models
don't have implementations. Then we can figure out
how to implement it.
For lower model CPUs, it should be safe to assume they
will never be seen in SMP systems and using a
generic RTEMS providing implementation that disables
interrupts and does the operation is OK.
--joel
> WeiY
> Best Regards
> 在 2013-8-6,下午11:37,Jonathan Wakely <jwakely.gcc@gmail.com> 写道:
>
>> On 6 August 2013 16:30, Deng Hengyi wrote:
>>> Hi Jonathan,
>>>
>>> Thank you for your reply.
>>> And about the error i encounter, do you have any advice? maybe it is caused by my toolchain not install rightly?
>>> In the standard pc686 architecture(not cross compile on RTEMS) will it encounter the similar error?
>> I don't know anything about the RTEMS port. You might need to build
>> and link to libatomic, but I don't know.
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985