richfelker / musl-cross-make

Simple makefile-based build for musl cross compiler

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

binutils/gprofng: patch needed for musl

voltagex opened this issue · comments

https://sourceware.org/bugzilla/show_bug.cgi?id=30779

Mainly adding this here in case anyone else hits it, or more likely, when I search this again in a year.

../../../src_binutils/gprofng/libcollector/iolib.c:112:49: error: unknown type name 'off64_t'; did you mean 'off_t'?

This may only impact binutils 2.41, I'm not sure.

I ended up needing to disable gprofng in litecross completely, as I was getting strange errors saying it couldn't find memcpy and things like that.

The commit "fixing" it is all wrong and hard-codes assumptions about musl, invents a musl macro, and pokes at namespace reserved to the implementation.

The right fix is to revert the patch https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=576d2c97d8de26d1ab5a2058e8ba4ffd00b8096d;hp=62544b0cf1b428fb86f01f56783437bd78f9097c and instead remove all the unnecessary 64's that were there for LFS64 stuff, and use standard type uint64_t in place of __u64.

But being that gprof has never worked on musl and that gprofng seems to have a bad record on even trying to do the right thing, I think we should just add --disable-gprofng when adding support for new binutils versions that include it.