[patch, gprofng, riscv64] Fix build on Linux riscv64

Vladimir Mezentsev vladimir.mezentsev@oracle.com
Mon Sep 23 22:54:38 GMT 2024



On 9/23/24 13:37, Vladimir Mezentsev wrote:
>
>
> On 9/23/24 09:26, Andreas Schwab wrote:
>> On Sep 23 2024, Sergey Fedorov wrote:
>>
>>> @@ -46,8 +50,11 @@ __get_cpuid (unsigned int op ATTRIBUTE_UNUSED, 
>>> unsigned int *eax,
>>>   #include <sched.h>
>>>   #include <sys/syscall.h>
>>>   #include <unistd.h>
>>> +// This header does not exist in earlier versions.
>>> +#if defined(__linux__) && LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
>>>   #include <asm/hwprobe.h>
> gprofng doesn't support dtrace now.
> asm/hwprobe.h is no longer needed. Just delete this line. -Vladimir


Ops. Ignore my comment.
The fix is under __riscv only. I never built on riscv.


>
>>>   #endif
>>> +#endif
>> This could also use __has_include.

+1

-Vladimir

>>
>



More information about the Binutils mailing list