Bug 359202 - Add musl libc configure/compile
Summary: Add musl libc configure/compile
Status: RESOLVED FIXED
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.11 SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-09 20:45 UTC by Peter Seiderer
Modified: 2017-04-11 16:01 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
[PATCH v1] Fixes for musl libc. (3.16 KB, patch)
2016-02-09 20:47 UTC, Peter Seiderer
Details
[PATCH v2] Fixes for musl libc. (3.19 KB, patch)
2016-02-11 20:08 UTC, Peter Seiderer
Details
Updated patch for 3.10.1 (3.15 KB, patch)
2016-12-02 07:19 UTC, A. Wilcox (awilfox)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Seiderer 2016-02-09 20:45:05 UTC
Unpatched valgrind-3.11.0 fails to compile with musl libc, attached patch
enables muls libc compile (for buildroot details see [1]).

[1] https://patchwork.ozlabs.org/patch/538683/

Reproducible: Always
Comment 1 Peter Seiderer 2016-02-09 20:47:33 UTC
Created attachment 97120 [details]
[PATCH v1] Fixes for musl libc.

[PATCH v1] Fixes for musl libc.

- add musl libc detection (prevents configure error)
- adjust preload and symbol names (based on the OpenWrt
  patch, see [1])

[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/200-musl_fix.patch?rev=46302
Comment 2 Peter Seiderer 2016-02-11 20:08:33 UTC
Created attachment 97156 [details]
[PATCH v2] Fixes for musl libc.

- add musl libc detection (prevents configure error)
- adjust preload and symbol names (based on the OpenWrt
  patch, see [1])

[1] https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/200-musl_fix.patch?rev=46302

Changes v1 -> v2:
change ifdef logic, fix uClibc spelling
Comment 3 A. Wilcox (awilfox) 2016-12-02 07:19:44 UTC
Created attachment 102572 [details]
Updated patch for 3.10.1

I've taken the patch that was posted here and updated it to apply cleanly to 3.10.1.  I've only tested memcheck, but it works great.
Comment 4 Petar Jovanovic 2017-04-05 13:03:10 UTC
(In reply to Peter Seiderer from comment #2)
> Created attachment 97156 [details]
> [PATCH v2] Fixes for musl libc.
> 
> - add musl libc detection (prevents configure error)
> - adjust preload and symbol names (based on the OpenWrt
>   patch, see [1])
> 
> [1]
> https://dev.openwrt.org/browser/trunk/package/devel/valgrind/patches/200-
> musl_fix.patch?rev=46302
> 
> Changes v1 -> v2:
> change ifdef logic, fix uClibc spelling

The patch makes sense.
Anyone has objections that we put this into the tree?
Comment 5 Ivo Raisr 2017-04-05 16:34:55 UTC
No objections here.
Comment 6 Petar Jovanovic 2017-04-06 12:40:29 UTC
Committed as r16296.
Thanks.
Comment 7 Petar Jovanovic 2017-04-11 15:44:08 UTC
This issue can be closed now.