blob: 4cac830aec7f6c1fe45962cca08f96d7f9d16138 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
#!/bin/bash
set -e
export TARGET_ARCH=aarch64-linux-gnu
if [[ $(uname -m) =~ ^(arm64|aarch64)$ ]]; then
export BUILD_ARCH=aarch64-linux-gnu
fi
if [ "$TARGET_ARCH" == "$BUILD_ARCH" ]; then
# Native build
if [ "${CC#clang}" != "${CC}" ] ; then
export CXX="clang++"
fi
# Required by CentOS and Rocky Linux to find DPDK install
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib64/pkgconfig
else
# Cross compilation
if [ "${CC#clang}" != "${CC}" ] ; then
export CC="clang --target=${TARGET_ARCH}"
export CXX="clang++ --target=${TARGET_ARCH}"
else
export CC="${TARGET_ARCH}-gcc"
export CXX="${TARGET_ARCH}-g++"
fi
export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk"
# Use target libraries
export PKG_CONFIG_PATH=
export PKG_CONFIG_LIBDIR=/usr/lib/${TARGET_ARCH}/pkgconfig:/usr/local/lib/${TARGET_ARCH}/pkgconfig
fi
# ARMv8 crypto
export PKG_CONFIG_PATH=~/aarch64cryptolib/pkgconfig:$PKG_CONFIG_PATH
exec "$(dirname "$0")"/build.sh
|