gprofng: fix build issues on musl
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Wed, 14 Sep 2022 08:11:45 +0000 (01:11 -0700)
committerVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Thu, 15 Sep 2022 01:38:09 +0000 (18:38 -0700)
commitfe39ffdc202f04397f31557f17170b40bc42b77a
treec3ca6dc745c7d4a6d13d1403fabf2240844b7ba9
parent8422cbe455d762f068ed1edefc717f36a105da42
gprofng: fix build issues on musl

gprofng/ChangeLog
2022-09-14  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

PR gprofng/29477
* configure.ac: Set __MUSL_LIBC.
* configure: Rebuild.
* common/config.h.in: Rebuild.
* src/collector_module.h: Fix compiler errors because mmap64, open64,
pwrite64 are macros and getcontext() is absent on musl.
* libcollector/collector.c: Likewise.
* libcollector/hwprofile.c: Likewise.
* libcollector/iolib.c: Likewise.
* libcollector/libcol_util.c: Likewise.
* libcollector/linetrace.c: Likewise.
* libcollector/memmgr.c: Likewise.
* libcollector/profile.c: Likewise.
* libcollector/unwind.c: Likewise.
* libcollector/dispatcher.c: Likewise.
* src/Experiment.cc: Likewise.
* libcollector/collector.h: Use dlsym() because dlvsym() is not defined
on musl.
* libcollector/iotrace.c: Remove interposition of versioned functions.
* libcollector/mmaptrace.c: Likewise.
* libcollector/libcol_util.h: Fix -Wint-to-pointer-cast warnings.
* libcollector/jprofile.c: Likewise.
* libcollector/synctrace.c: Include "collector.h".
* src/Print.cc: Use get_basename() because basename() is not defined
on musl.
* common/hwcdrv.c: Fix -Wformat= warnings.
22 files changed:
gprofng/common/config.h.in
gprofng/common/hwcdrv.c
gprofng/configure
gprofng/configure.ac
gprofng/libcollector/collector.c
gprofng/libcollector/collector.h
gprofng/libcollector/dispatcher.c
gprofng/libcollector/hwprofile.c
gprofng/libcollector/iolib.c
gprofng/libcollector/iotrace.c
gprofng/libcollector/jprofile.c
gprofng/libcollector/libcol_util.c
gprofng/libcollector/libcol_util.h
gprofng/libcollector/linetrace.c
gprofng/libcollector/memmgr.c
gprofng/libcollector/mmaptrace.c
gprofng/libcollector/profile.c
gprofng/libcollector/synctrace.c
gprofng/libcollector/unwind.c
gprofng/src/Experiment.cc
gprofng/src/Print.cc
gprofng/src/collector_module.h