[PATCH v2] lib/eal/ppc fix compilation for musl

Dunk dunk at denkimushi.com
Mon May 2 22:18:05 CEST 2022



> On 2 May 2022, at 18:42, David Marchand <david.marchand at redhat.com> wrote:
> 
> On Mon, May 2, 2022 at 4:26 PM Duncan Bellamy <dunk at denkimushi.com> wrote:
>> 
>> musl lacks __ppc_get_timebase() but has __builtin_ppc_get_timebase()
>> 
>> the __ppc_get_timebase_freq() is taken from:
>> https://git.alpinelinux.org/aports/commit/?id=06b03f70fb94972286c0c9f6278df89e53903833
>> 
>> Signed-off-by: Duncan Bellamy <dunk at denkimushi.com>
>> ---
>> lib/eal/ppc/include/rte_cycles.h |  6 ++++++
>> lib/eal/ppc/rte_cycles.c         | 32 ++++++++++++++++++++++++++++++++
>> 2 files changed, 38 insertions(+)
>> 
>> diff --git a/lib/eal/ppc/include/rte_cycles.h b/lib/eal/ppc/include/rte_cycles.h
>> index 5585f9273c..98ffbd2592 100644
>> --- a/lib/eal/ppc/include/rte_cycles.h
>> +++ b/lib/eal/ppc/include/rte_cycles.h
>> @@ -10,7 +10,9 @@
>> extern "C" {
>> #endif
>> 
>> +#if defined(__GLIBC__)
> 
> features.h should be included before looking for __GLIBC__.
> 
> 
> -- 
> David Marchand
> 

Okay, wondered why it wasn’t working 


More information about the dev mailing list