Skip to content

Commit

Permalink
prototype: aarch64 sandbox (configurable sandbox+toolchain)
Browse files Browse the repository at this point in the history
  • Loading branch information
mahaase committed Mar 1, 2021
1 parent e37e747 commit 0a932d3
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 12 deletions.
10 changes: 7 additions & 3 deletions recipes/devel/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,22 @@ checkoutSCM:
digestSHA1: "851537fc03f5a99419ef20e9b836de965c7928bd"
extract: False

buildTools: [target-toolchain]
buildVars: [PKG_VERSION, AUTOCONF_HOST,
CPPFLAGS, CFLAGS, LDFLAGS]
buildTools: [target-toolchain, host-toolchain]
buildVars: [PKG_VERSION, AUTOCONF_HOST, AUTOCONF_BUILD,
CC, CPPFLAGS, CFLAGS, LDFLAGS]
buildScript: |
export CFLAGS="-I${BOB_DEP_PATHS[libs::zlib-dev]}/usr/include -I${BOB_DEP_PATHS[libs::openssl-dev]}/usr/include"
export LDFLAGS="-L${BOB_DEP_PATHS[libs::zlib-dev]}/usr/lib -L${BOB_DEP_PATHS[libs::openssl-dev]}/usr/lib -Wl,-rpath-link=${BOB_DEP_PATHS[libs::zlib-dev]}/usr/lib -Wl,-rpath-link=${BOB_DEP_PATHS[libs::openssl-dev]}/usr/lib"
export ac_cv_fread_reads_directories=yes
export ac_cv_snprintf_returns_bogus=no
mkdir -p install
tar -xf $1/git-${PKG_VERSION}.tar.xz
pushd git-${PKG_VERSION}
./configure --host=${AUTOCONF_HOST} \
--build=${AUTOCONF_BUILD} \
--prefix=/usr \
--with-curl=${BOB_DEP_PATHS[net::curl-dev]}/usr \
--without-python \
Expand Down
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)}"
6 changes: 4 additions & 2 deletions recipes/devel/sandbox.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ depends:
-
name: devel::cross-toolchain
environment:
AUTOCONF_TARGET: "x86_64-bob-linux-gnu"
ARCH: x86_64
# TODO AUTOCONF_TARGET: "${SANDBOX_AUTOCONF_TARGET:-x86_64-bob-linux-gnu}"
AUTOCONF_TARGET: "aarch64-bob-linux-gnu"
# TODO ARCH: "${SANDBOX_ARCH:-x86_64}"
ARCH: "arm64"
GCC_LIBC: glibc
BASEMENT_OPTIMIZE: "s"
BASEMENT_DEBUG: "0"
Expand Down
5 changes: 3 additions & 2 deletions recipes/libs/expat.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
inherit: [autotools]

metaEnvironment:
PKG_VERSION: "2.1.0"
PKG_VERSION: "2.2.10"

checkoutSCM:
scm: url
url: http://downloads.sourceforge.net/project/expat/expat/${PKG_VERSION}/expat-${PKG_VERSION}.tar.gz
digestSHA1: "b08197d146930a5543a7b99e871cba3da614f6f0"
digestSHA256: bf42d1f52371d23684de36cc6d2f0f1acd02de264d1105bdc17792bbeb7e7ceb
stripComponents: 1

buildTools: [host-toolchain]
buildScript: |
autotoolsBuild $1
Expand Down
5 changes: 3 additions & 2 deletions recipes/libs/libcap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ checkoutSCM:
digestSHA1: "0d6e242d70e80c243a7abeb787e007835b3f0d3d"
extract: False

buildTools: [target-toolchain]
buildVars: [AR, CC, RANLIB, PKG_VERSION]
buildTools: [target-toolchain, host-toolchain]
buildVars: [AR, CC, RANLIB, PKG_VERSION, CROSS_COMPILE]
buildScript: |
tar -xzf $1/libcap-${PKG_VERSION}.tar.gz
mkdir -p install
Expand All @@ -19,6 +19,7 @@ buildScript: |
lib=lib \
AR=$AR \
CC=$CC \
${CROSS_COMPILE:+BUILD_CC=gcc} \
RANLIB=$RANLIB \
RAISE_SETFCAP=no \
DESTDIR="$PWD/install" \
Expand Down
6 changes: 6 additions & 0 deletions tests/cross-platform/recipes/cmake/greeter.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
inherit: [ "basement::rootrecipe", cmake ]

environment:
SANDBOX_AUTOCONF_HOST: "aarch64-bob-linux-gnu"
SANDBOX_AUTOCONF_BUILD: "aarch64-bob-linux-gnu"
SANDBOX_AUTOCONF_TARGET: "aarch64-bob-linux-gnu"
SANDBOX_ARCH: "arm64"

checkoutSCM:
scm: import
url: src/greeter/
Expand Down

0 comments on commit 0a932d3

Please sign in to comment.