diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-05-04 15:40:33 +0300 |
---|---|---|
committer | Matias Elo <matias.elo@nokia.com> | 2022-05-04 15:40:33 +0300 |
commit | 2f0df4cb4acdee52f436cad8476ccf662821b7b5 (patch) | |
tree | 085136f3d98d8187b17ea584c992c8117bdedd8f /scripts/ci | |
parent | 2f869d2698349bf75ec2404d4ab7d7f3b5b4c88b (diff) | |
parent | e361227ac00851e8720871e927b015c4c0e6a895 (diff) |
Merge tag 'v1.36.0.0' of https://github.com/OpenDataPlane/odp into odp-dpdk
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Diffstat (limited to 'scripts/ci')
-rwxr-xr-x | scripts/ci/build_arm64.sh | 29 |
1 files changed, 19 insertions, 10 deletions
diff --git a/scripts/ci/build_arm64.sh b/scripts/ci/build_arm64.sh index 79b55e531..f340a0ca0 100755 --- a/scripts/ci/build_arm64.sh +++ b/scripts/ci/build_arm64.sh @@ -6,18 +6,27 @@ if [[ $(uname -m) =~ ^(arm64|aarch64)$ ]]; then export BUILD_ARCH=aarch64-linux-gnu fi -if [ "${CC#clang}" != "${CC}" ] ; then - export CC="clang --target=${TARGET_ARCH}" - export CXX="clang++ --target=${TARGET_ARCH}" +if [ "$TARGET_ARCH" == "$BUILD_ARCH" ]; then + # Native build + if [ "${CC#clang}" != "${CC}" ] ; then + export CXX="clang++" + fi else - export CC="${TARGET_ARCH}-gcc" - export CXX="${TARGET_ARCH}-g++" -fi -export CPPFLAGS="-I/usr/include/${TARGET_ARCH}/dpdk" + # 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 + # 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 |