Skip to contentSkip to conversation

gperftools: Fix build on musl/mips

PATCH New Khem Raj 1 participant 1 message Oct 17, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 gperftools: Fix build on musl/mips

---
 .../recipes-support/gperftools/gperftools/sgidef.patch  | 17 +++++++++++++++++
 meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb  |  1 +
 2 files changed, 18 insertions(+)
 create mode 100644 meta-oe/recipes-support/gperftools/gperftools/sgidef.patch
meta-oe/recipes-support/gperftools/gperftools/sgidef.patch new file +17 -0
new file mode 100644
index 000000000..7e1a23bf6
@@ -0,0 +1,17 @@
+sgidef.h does not exist on musl and its not needed to compile
+
+Signed-off-by: Khem Raj <[email protected]>
+Upstream-Status: Pending
+Index: git/src/base/linux_syscall_support.h
+===================================================================
+--- git.orig/src/base/linux_syscall_support.h
++++ git/src/base/linux_syscall_support.h
+@@ -164,7 +164,7 @@ extern "C" {
+ #include <endian.h>
+ #include <fcntl.h>
+ 
+-#ifdef __mips__
++#if defined(__mips__) && defined(__glibc__)
+ /* Include definitions of the ABI currently in use.                          */
+ #include <sgidefs.h>
+ #endif
meta-oe/recipes-support/gperftools/gperftools_2.6.1.bb +1 -0
index 8ce376c91..ecac6c5cc 100644
@@ -12,6 +12,7 @@ SRC_URI = "git://github.com/gperftools/gperftools \
            file://0001-include-fcntl.h-for-loff_t-definition.patch \
            file://0001-disbale-heap-checkers-and-debug-allocator-on-musl.patch \
            file://disable_libunwind_aarch64.patch \
+           file://sgidef.patch \
            "
 
 inherit autotools
Signature · 1 line
2.14.2