Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

generic sandbox: build a sandbox by available toolchain #154

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions classes/sandbox-toolchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ provideVars:
# architecture is the same.
AUTOCONF_BUILD: "${SANDBOX_AUTOCONF_BUILD}"
AUTOCONF_HOST: "${SANDBOX_AUTOCONF_HOST}"
ARCH: "${SANDBOX_ARCH:-$ARCH}"
3 changes: 3 additions & 0 deletions classes/sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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}}"

2 changes: 1 addition & 1 deletion recipes/devel/bootstrap-sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion recipes/devel/cross-toolchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 1 addition & 1 deletion recipes/devel/host-compat-toolchain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions recipes/devel/sandbox-toolchain.yaml
Original file line number Diff line number Diff line change
@@ -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)}"
5 changes: 2 additions & 3 deletions recipes/devel/sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -90,4 +90,3 @@ depends:
depends:
- devel::binutils
- devel::gcc-native

10 changes: 9 additions & 1 deletion tests/cross-platform/recipes/cmake/greeter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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