Bug 433469 - FreeBSD support, part 4
Summary: FreeBSD support, part 4
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: drd (show other bugs)
Version: unspecified
Platform: Other FreeBSD
: NOR normal
Target Milestone: ---
Assignee: Bart Van Assche
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-23 08:56 UTC by Paul Floyd
Modified: 2021-10-06 21:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
DRD code changes (6.71 KB, patch)
2021-02-23 08:56 UTC, Paul Floyd
Details
DRD code changes (6.71 KB, patch)
2021-09-23 19:21 UTC, Paul Floyd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Floyd 2021-02-23 08:56:43 UTC
Created attachment 136076 [details]
DRD code changes

A fairly small patch.

The semaphore sem functions functions are in libc rather than in libthr, so I used a different macro for the. Most of the other changes are just adding "define
d(VGO_freebsd)"

There's also a workaround related loading shared libs and the fact that libc contains stubs whilst the real implementations are in libthr
Comment 1 Paul Floyd 2021-09-23 19:21:52 UTC
Created attachment 141835 [details]
DRD code changes
Comment 2 Mark Wielaard 2021-09-26 18:58:43 UTC
I am glad the dlclose(dlopen) trickery is contained to #if defined(VGO_freebsd). It looks scary.

The rest seems fine (and it compiles as is on fedora x86_64).

I do wonder if the LIBC_FUNC define cannot be done as a 
PTH_FUNCS define variant.
Comment 3 Paul Floyd 2021-09-26 19:23:16 UTC
The dlclose(dlopen()) fix took a lot of effort to hunt down (and a bit form the FreeBSD toolchain folks).
Comment 4 Paul Floyd 2021-10-06 21:08:30 UTC
Code committed as
commit 7074904a377a52c76cbc8feaf618fa31b8a663b7