diff --git a/classes/sandbox-toolchain.yaml b/classes/sandbox-toolchain.yaml index 429c2475..edd706b6 100644 --- a/classes/sandbox-toolchain.yaml +++ b/classes/sandbox-toolchain.yaml @@ -62,3 +62,4 @@ provideVars: # architecture is the same. AUTOCONF_BUILD: "${SANDBOX_AUTOCONF_BUILD}" AUTOCONF_HOST: "${SANDBOX_AUTOCONF_HOST}" + ARCH: "${SANDBOX_ARCH:-$ARCH}" diff --git a/classes/sandbox.yaml b/classes/sandbox.yaml index 91f94a9c..0282d2fe 100644 --- a/classes/sandbox.yaml +++ b/classes/sandbox.yaml @@ -70,4 +70,7 @@ provideSandbox: mount: - "/etc/resolv.conf" - "/dev/pts" + environment: + AUTOCONF_HOST: "${SANDBOX_AUTOCONF_HOST:-${AUTOCONF_HOST}}" + AUTOCONF_BUILD: "${SANDBOX_AUTOCONF_BUILD:-${AUTOCONF_BUILD}}" diff --git a/recipes/devel/bootstrap-sandbox.yaml b/recipes/devel/bootstrap-sandbox.yaml index 2d209cb5..1b07d86a 100644 --- a/recipes/devel/bootstrap-sandbox.yaml +++ b/recipes/devel/bootstrap-sandbox.yaml @@ -41,7 +41,7 @@ depends: - name: devel::cross-toolchain environment: - AUTOCONF_TARGET: "x86_64-wendy-linux-gnu" + AUTOCONF_TARGET: "$(gen-autoconf,wendy)" ARCH: x86_64 GCC_LIBC: glibc BASEMENT_OPTIMIZE: "s" diff --git a/recipes/devel/cross-toolchain.yaml b/recipes/devel/cross-toolchain.yaml index c30354c5..1cd1bab3 100644 --- a/recipes/devel/cross-toolchain.yaml +++ b/recipes/devel/cross-toolchain.yaml @@ -88,7 +88,7 @@ multiPackage: # ARMv8-A AArch64 Linux toolchain aarch64-linux-gnu: environment: - AUTOCONF_TARGET: "aarch64-linux-gnu" + AUTOCONF_TARGET: "aarch64-cross-linux-gnu" ARCH: "arm64" GCC_TARGET_ARCH: "armv8-a" GCC_LIBC: "glibc" diff --git a/recipes/devel/host-compat-toolchain.yaml b/recipes/devel/host-compat-toolchain.yaml index 2e1f3ec3..321b7458 100644 --- a/recipes/devel/host-compat-toolchain.yaml +++ b/recipes/devel/host-compat-toolchain.yaml @@ -6,7 +6,7 @@ shared: True environment: - AUTOCONF_TARGET: "$(gen-autoconf,bob_compat)" + AUTOCONF_TARGET: "${SANDBOX_AUTOCONF_TARGET:-$(gen-autoconf,bob_compat)}" depends: # The following tools are needed by the cross-toolchain build process. diff --git a/recipes/devel/sandbox-toolchain.yaml b/recipes/devel/sandbox-toolchain.yaml index 1241553a..7c2083f8 100644 --- a/recipes/devel/sandbox-toolchain.yaml +++ b/recipes/devel/sandbox-toolchain.yaml @@ -1,5 +1,5 @@ inherit: [sandbox-toolchain] privateEnvironment: - SANDBOX_AUTOCONF_BUILD: "$(gen-autoconf,bob)" - SANDBOX_AUTOCONF_HOST: "$(gen-autoconf,bob)" + SANDBOX_AUTOCONF_BUILD: "${SANDBOX_AUTOCONF_BUILD:-$(gen-autoconf,bob)}" + SANDBOX_AUTOCONF_HOST: "${SANDBOX_AUTOCONF_HOST:-$(gen-autoconf,bob)}" diff --git a/recipes/devel/sandbox.yaml b/recipes/devel/sandbox.yaml index c23dfd81..b6c3ad8d 100644 --- a/recipes/devel/sandbox.yaml +++ b/recipes/devel/sandbox.yaml @@ -47,8 +47,8 @@ depends: - name: devel::cross-toolchain environment: - AUTOCONF_TARGET: "x86_64-bob-linux-gnu" - ARCH: x86_64 + AUTOCONF_TARGET: "${SANDBOX_AUTOCONF_HOST:-$(gen-autoconf,bob)}" + ARCH: "${SANDBOX_ARCH:-$(host-arch)}" GCC_LIBC: glibc BASEMENT_OPTIMIZE: "s" BASEMENT_DEBUG: "0" @@ -90,4 +90,3 @@ depends: depends: - devel::binutils - devel::gcc-native - diff --git a/tests/cross-platform/recipes/cmake/greeter.yaml b/tests/cross-platform/recipes/cmake/greeter.yaml index 2bf40866..7c75264d 100644 --- a/tests/cross-platform/recipes/cmake/greeter.yaml +++ b/tests/cross-platform/recipes/cmake/greeter.yaml @@ -22,7 +22,7 @@ multiPackage: - cmake::libgreet-dev - cmake::libgreet-tgt cross: - depends: + depends: &cross - if: !expr | "${BOB_HOST_PLATFORM}" == "msys" || "${BOB_HOST_PLATFORM}" == "win32" name: devel::win::vs2019-toolchain-vc142-amd64 @@ -34,3 +34,11 @@ multiPackage: use: [tools] forward: True - depends: *deps + cross-aarch64: + environment: + # this is just an example how to use this sandbox inside a recipe + SANDBOX_AUTOCONF_HOST: "aarch64-bob-linux-gnu" + SANDBOX_AUTOCONF_BUILD: "aarch64-bob-linux-gnu" + SANDBOX_AUTOCONF_TARGET: "aarch64-bob_compat-linux-gnu" + SANDBOX_ARCH: "arm64" + depends: *cross