Skip to content

Instantly share code, notes, and snippets.

@barrbrain
Created July 15, 2021 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save barrbrain/847b9b8a2dfb42581547a349d394f2a9 to your computer and use it in GitHub Desktop.
Save barrbrain/847b9b8a2dfb42581547a349d394f2a9 to your computer and use it in GitHub Desktop.
Run rav1e aarch64 fuzzer via cross-compilation
[binaries]
c = 'aarch64-linux-gnu-gcc'
cpp = 'aarch64-linux-gnu-g++'
ar = 'aarch64-linux-gnu-ar'
strip = 'aarch64-linux-gnu-strip'
pkgconfig = 'pkg-config'
[properties]
needs_exe_wrapper = true
[host_machine]
system = 'gnu'
cpu_family = 'aarch64'
endian = 'little'
cpu = 'aarch64'
git clone https://code.videolan.org/videolan/dav1d.git
cp aarch64-linux.meson dav1d/package/crossfiles/
cd dav1d
mkdir build && cd build
meson .. --default-library=static --cross-file=../package/crossfiles/aarch64-linux.meson --prefix=/usr/aarch64-linux-gnu
ninja install
cd ../..
# TODO: Set runner to QEMU with additional flags
sudo ln -s /usr/aarch64-linux-gnu/lib/ld-linux-aarch64.so.1 /lib
git clone https://github.com/xiph/rav1e.git
cd rav1e
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=/usr/bin/aarch64-linux-gnu-gcc \
LD_LIBRARY_PATH=/usr/aarch64-linux-gnu/lib \
TARGET_PKG_CONFIG_ALLOW_CROSS=1 \
TARGET_PKG_CONFIG_PATH=/usr/aarch64-linux-gnu/lib/pkgconfig \
rustup run stable cross fuzz run --target=aarch64-unknown-linux-gnu -s none --release encode_decode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment