mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-21 08:49:06 +08:00
Build latest pahole from sources and not rely on hacky Ubuntu repository approach. Also enable tests for latest kernel that rely on pahole 1.16. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
26 lines
463 B
Bash
Executable File
26 lines
463 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eux
|
|
|
|
CWD=$(pwd)
|
|
REPO_PATH=$1
|
|
PAHOLE_ORIGIN=https://git.kernel.org/pub/scm/devel/pahole/pahole.git
|
|
|
|
mkdir -p ${REPO_PATH}
|
|
cd ${REPO_PATH}
|
|
git init
|
|
git remote add origin ${PAHOLE_ORIGIN}
|
|
git fetch origin
|
|
git checkout master
|
|
|
|
mkdir -p build
|
|
cd build
|
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -D__LIB=lib ..
|
|
make -j$((4*$(nproc))) all
|
|
sudo make install
|
|
|
|
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH:-}:/usr/local/lib
|
|
ldd $(which pahole)
|
|
pahole --version
|
|
|