parent
aded73897c
commit
031a251762
8 changed files with 102 additions and 0 deletions
|
@ -3425,3 +3425,6 @@ libyang.so.0.16 libyang-0.16r3_1
|
||||||
libhtp.so.2 libhtp-0.5.30_1
|
libhtp.so.2 libhtp-0.5.30_1
|
||||||
libgedit-3.14.so gedit-3.32.0_1
|
libgedit-3.14.so gedit-3.32.0_1
|
||||||
libchewing.so.3 libchewing-0.5.1_1
|
libchewing.so.3 libchewing-0.5.1_1
|
||||||
|
libdwarves.so.1 pahole-1.12_1
|
||||||
|
libdwarves_emit.so.1 pahole-1.12_1
|
||||||
|
libdwarves_reorganize.so.1 pahole-1.12_1
|
||||||
|
|
1
srcpkgs/pahole-devel
Symbolic link
1
srcpkgs/pahole-devel
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
pahole
|
13
srcpkgs/pahole/patches/fix_always_inline.patch
Normal file
13
srcpkgs/pahole/patches/fix_always_inline.patch
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
--- dutil.h.orig
|
||||||
|
+++ dutil.h
|
||||||
|
@@ -28,6 +28,10 @@
|
||||||
|
#define __pure __attribute__ ((pure))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef __always_inline
|
||||||
|
+#define __always_inline inline
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#define roundup(x,y) ((((x) + ((y) - 1)) / (y)) * (y))
|
||||||
|
|
||||||
|
static inline __attribute__((const)) bool is_power_of_2(unsigned long n)
|
10
srcpkgs/pahole/patches/fix_limits.patch
Normal file
10
srcpkgs/pahole/patches/fix_limits.patch
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- dwarves.c.orig
|
||||||
|
+++ dwarves.c
|
||||||
|
@@ -24,6 +24,7 @@
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
+#include <limits.h>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
#include "list.h"
|
16
srcpkgs/pahole/patches/fix_mallinfo.patch
Normal file
16
srcpkgs/pahole/patches/fix_mallinfo.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- dtagnames.c.orig
|
||||||
|
+++ dtagnames.c
|
||||||
|
@@ -16,9 +16,13 @@
|
||||||
|
|
||||||
|
static void print_malloc_stats(void)
|
||||||
|
{
|
||||||
|
+#ifdef __GLIBC__
|
||||||
|
struct mallinfo m = mallinfo();
|
||||||
|
|
||||||
|
fprintf(stderr, "size: %u\n", m.uordblks);
|
||||||
|
+#else
|
||||||
|
+ fprintf(stderr, "malloc stats not available\n");
|
||||||
|
+#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
static int class__tag_name(struct tag *tag, struct cu *cu __unused,
|
16
srcpkgs/pahole/patches/fix_sysconf.patch
Normal file
16
srcpkgs/pahole/patches/fix_sysconf.patch
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
--- dwarves_fprintf.c.orig
|
||||||
|
+++ dwarves_fprintf.c
|
||||||
|
@@ -1683,11 +1683,13 @@
|
||||||
|
void dwarves__fprintf_init(uint16_t user_cacheline_size)
|
||||||
|
{
|
||||||
|
if (user_cacheline_size == 0) {
|
||||||
|
+#ifdef _SC_LEVEL1_DCACHE_LINESIZE
|
||||||
|
long sys_cacheline_size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
|
||||||
|
|
||||||
|
if (sys_cacheline_size > 0)
|
||||||
|
cacheline_size = sys_cacheline_size;
|
||||||
|
else
|
||||||
|
+#endif
|
||||||
|
cacheline_size = 64; /* Fall back to a sane value */
|
||||||
|
} else
|
||||||
|
cacheline_size = user_cacheline_size;
|
12
srcpkgs/pahole/patches/fix_wordsize.patch
Normal file
12
srcpkgs/pahole/patches/fix_wordsize.patch
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
--- hash.h.orig
|
||||||
|
+++ hash.h
|
||||||
|
@@ -16,6 +16,9 @@
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
+#undef __WORDSIZE
|
||||||
|
+#define __WORDSIZE 64
|
||||||
|
+
|
||||||
|
/* 2^31 + 2^29 - 2^25 + 2^22 - 2^19 - 2^16 + 1 */
|
||||||
|
#define GOLDEN_RATIO_PRIME_32 0x9e370001UL
|
||||||
|
/* 2^63 + 2^61 - 2^57 + 2^54 - 2^51 - 2^18 + 1 */
|
31
srcpkgs/pahole/template
Normal file
31
srcpkgs/pahole/template
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Template file for 'pahole'
|
||||||
|
pkgname=pahole
|
||||||
|
version=1.12
|
||||||
|
revision=1
|
||||||
|
build_style=cmake
|
||||||
|
configure_args="-D__LIB=lib"
|
||||||
|
makedepends="elfutils-devel zlib-devel"
|
||||||
|
short_desc="Various DWARF utils"
|
||||||
|
maintainer="Andrew Benson <abenson+void@gmail.com>"
|
||||||
|
license="GPL-2.0-only"
|
||||||
|
homepage="http://git.kernel.org/?p=devel/pahole/pahole.git;a=summary"
|
||||||
|
distfiles="https://git.kernel.org/pub/scm/devel/pahole/pahole.git/snapshot/pahole-${version}.tar.gz"
|
||||||
|
checksum=2452464cbfdbaece6187d7860000fe8ef24b7271f88122cf540d3e0ab4a644d1
|
||||||
|
|
||||||
|
case $XBPS_TARGET_MACHINE in
|
||||||
|
*-musl) makedepends+=" musl-obstack argp-standalone"
|
||||||
|
esac
|
||||||
|
|
||||||
|
pre_configure() {
|
||||||
|
case $XBPS_TARGET_MACHINE in
|
||||||
|
*-musl) sed -i CMakeLists.txt -e "/^target_link_libraries/s/)/ obstack argp)/"
|
||||||
|
esac
|
||||||
|
}
|
||||||
|
|
||||||
|
pahole-devel_package() {
|
||||||
|
short_desc+=" - development files"
|
||||||
|
pkg_install() {
|
||||||
|
vmove /usr/include
|
||||||
|
vmove "/usr/lib/*.so"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue