> -----Original Message----- > From: lng-odp [mailto:lng-odp-boun...@lists.linaro.org] On Behalf Of > Christophe Milard > Sent: Monday, February 20, 2017 6:10 PM > To: Maxim Uvarov <maxim.uva...@linaro.org> > Cc: LNG ODP Mailman List <lng-odp@lists.linaro.org> > Subject: Re: [lng-odp] [PATCHv2] configure: libatomic check > > Hi, > > If these flags are required for compiling the examples, maybe, they > should not be moved to the platform m4. > But the problem is maybe more: Why do the examples (which are supposed > to be compilable by all) requires this? > > So maybe this change is good, and will trigger the example question... > > This seems to fix an issue, anyway, so I am positive to apply this patch > > Christophe > > On 16 February 2017 at 21:26, Maxim Uvarov <maxim.uva...@linaro.org> > wrote: > > upcoming patch ip fragmentation example fails to with > > gcc 4.8.4 on linking __atomic_compare_exchange_16 functions > > on x86. For some version of gcc both -latomic and -mcx16 > > needs to be provided in that case. For clang only -mcx16. That > > options are set internally for platform but do not set for examples. > > This patch unhides setting this options, make them common and printed > > on configure log. > > Reviewed-by: Christophe Milard <christophe.mil...@linaro.org>
I'm also worried that dependency to 128 bit atomics narrows down the number of target systems that can run odp-linux and examples. I'm sure that 128 bit atomics is supported by x86 and armv8, but how about older mips, powerpc, arm, tilera, etc CPUs and compilers for those? Examples should be more portable than odp-linux implementation. It should run as is on various implementations built with various (older) compilers that are part of vendor SDKs. Odp-linux is in better position (than examples) to have arch dependent #ifdefs and files to use 128 atomics when available, or fall back to locks when not available. -Petri