From 0531af40afc20fb43ffc8add7dca68c4138699a1 Mon Sep 17 00:00:00 2001 From: marvell Date: Wed, 30 Jun 2021 17:30:39 +0530 Subject: [PATCH] Ported Marvell armhf build on x86 for debian buster to use cross-compilation instead of qemu emulation Signed-off-by: marvell --- configure.ac | 6 +++++- python/setup.py.in | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 9f274d6c3d..7fc7504090 100644 --- a/configure.ac +++ b/configure.ac @@ -79,7 +79,11 @@ AC_ARG_ENABLE(redis-test, esac],[rtest=false]) AM_CONDITIONAL(RTEST, test x$rtest = xtrue) -AM_CONDITIONAL(ARCH64, test `getconf LONG_BIT` = "64") +if test x$CONFIGURED_ARCH = xarmhf && test x$CROSS_BUILD_ENVIRON = xy; then + AM_CONDITIONAL(ARCH64, false) +else + AM_CONDITIONAL(ARCH64, test `getconf LONG_BIT` = "64") +fi AC_PATH_PROGS(SWIG, [swig3.0 swig]) diff --git a/python/setup.py.in b/python/setup.py.in index f2505e0ffc..64a268ef4e 100644 --- a/python/setup.py.in +++ b/python/setup.py.in @@ -3,7 +3,8 @@ from distutils.command.build_ext import build_ext from distutils.sysconfig import customize_compiler import os -os.environ["CC"] = "g++" +os.environ["CC"] = os.getenv("CROSS_COMPILE", "") + "g++" +os.environ["CXX"] = os.getenv("CROSS_COMPILE", "") + "g++" swss_common_inc_dir = '@SWSS_COMMON_INC_DIR@'