diff options
author | Matias Elo <matias.elo@nokia.com> | 2022-03-17 14:56:06 +0200 |
---|---|---|
committer | Petri Savolainen <petri.savolainen@nokia.com> | 2022-03-18 13:44:05 +0200 |
commit | 75caa58daae574a413adf9bda0895519b21a40f3 (patch) | |
tree | 2595fcddf84c46ae3623ba390f61bc5d8762e251 /scripts | |
parent | dedd36bcc6e80723316b9e860bf6bb311df11c43 (diff) |
ci: fix native arm64 build
Don't override standard tools and paths when building ODP natively on
arm64. Run_OS(ubuntu_18.04) test was passing an empty CC variable as it
doesn't use matrix for compilers.
Signed-off-by: Matias Elo <matias.elo@nokia.com>
Reviewed-by: Tuomas Taipale <tuomas.taipale@nokia.com>
Reviewed-by: Petri Savolainen <petri.savolainen@nokia.com>
Diffstat (limited to 'scripts')
-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 |