Bug 359202

Summary: Add musl libc configure/compile
Product: [Developer tools] valgrind Reporter: Peter Seiderer <ps.report>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED FIXED    
Severity: normal CC: awilfox, ivosh, mips32r2
Priority: NOR    
Version: 3.11 SVN   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: [PATCH v1] Fixes for musl libc.
[PATCH v2] Fixes for musl libc.
Updated patch for 3.10.1

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.