Re: Build issues due to patch "gprofng: a new GNU profiler" – CLOCK_MONOTONIC_RAW not defined

Tobias Burnus tobias@codesourcery.com
Wed Mar 16 14:55:22 GMT 2022


Hi Nick,

On 16.03.22 13:29, Nick Clifton wrote:
>> Thanks for the commit – but it fails for
>> .../bin/ld: ./.libs/libgprofng.a(gethrtime.o): in function `gethrvtime':
>> obj/binutils-src-mainline-0-x86_64-none-linux-gnu-x86_64-linux-gnu/gprofng/src/gethrtime.c:131:
>> undefined reference to `clock_gettime'
>
> Hmm, it looks like I missed a few places where the -lrt library is
> needed.
>
> Please could you try out the attached patch and let me know if these
> changes
> (on top of the ones that have already been checked in) are enough to
> solve
> your build problems ?

Works – I had some patch-apply fails due to HJ's commits, but fixing the
.rej was trivial. (One line removed, two #line number changes, and two
changes in makefiles (.in, .mk) in two files which were already there.)

After doing so, your patch did build with the two x86-64 Linux build
servers (both require  -lrt, but only one has CLOCK_MONOTONIC_RAW). Thus:

:-)

Thanks,

Tobias

-----------------
Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955


More information about the Binutils mailing list