[lttng-dev] [liburcu PATCH 1/3] Refresh autoconf files

Mathieu Desnoyers compudj at krystal.dyndns.org
Fri Jan 6 10:50:56 EST 2012


* Alexandre Montplaisir (alexandre.montplaisir at polymtl.ca) wrote:
> On 12-01-06 10:33 AM, Mathieu Desnoyers wrote:
>> * Alexandre Montplaisir (alexandre.montplaisir at gmail.com) wrote:
>>> Use portable shell macros wherever possible.
>> Does it bring limitations as to what is the oldest
>> autoconf/automake/libtool versions we require ?
>
> These are used in lttng-tools too. In both projects the README mentions:
> - GNU autotools (automake >=1.10, autoconf >=2.50, autoheader >=2.50)
> so it shouldn't be affected.
>
> AS_IF, AS_ECHO and company will be useful if we want to port URCU to  
> Cygwin and/or MinGW.

OK, can you respin a patch that just has the portable shell macros bits ?

>
>>
>>> Change the mfence check to actually check for the assembly function,
>>> instead of relying on the architecture's name.
>> This check won't work as expected, because you can compile fine for a
>> target and have the mfence instruction in your code, the problem will
>> only show up at runtime.
>>
>> Due to cross-compilation support, we cannot use this kind of check.
>
> How is it different from the "amb" check that's already there? If I  
> understand correctly, we want to know if a feature if available on the  
> target, so that the library is compiled to use those instructions.
>
> Like I mentioned in the other email, shouldn't we use target_cpu for  
> these cases then?

AFAIK, on the ARM family of archs, if the instruction can be produced by
the toolchain, we pretty much assume that the hardware running it will
support it.

On x86, it's a little more subtle: a recent compiler will usually not
complain about generating code only suitable for P6+ (unless we specify
some flags that very few people use), but we'll get an illegal
instruction fault if we try to run it on an older architecture. This is
why I think it is better to let a configure option select whether the
generated binaries are planned to be deployed on a range of x86
architectures including very old ones back to i386.

Thanks,

Mathieu

>
>>
>> Thanks,
>>
>> Mathieu
>>
>>
>
>
> -- 
> Alexandre Montplaisir
> DORSAL lab,
> École Polytechnique de Montréal
>

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



More information about the lttng-dev mailing list