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

WIP aarch64 sandbox (configurable sandbox+toolchain) #78

Closed
wants to merge 27 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e152913
prototype: aarch64 sandbox (configurable sandbox+toolchain)
mahaase Mar 1, 2021
ab5e9e1
classes/sandbox-toolchain: added ARCH if SANDBOX_ARCH is set
mahaase Mar 1, 2021
eef9339
libs/compat/glibc: disabled werror
mahaase Mar 1, 2021
66d53b0
libs/compat/glibc: fixes for aarch64, maybe included in 2.27, if upda…
mahaase Mar 2, 2021
5ff1113
fixed the usage of a cross-built sandbox
mahaase Mar 2, 2021
438ce99
sandbox: provides AUTOCONF vars of itself
mahaase Mar 5, 2021
f406f7a
test: added a specific test-target for aarch64
mahaase Mar 5, 2021
49f84e7
libs/glibc: added another patch for aarch64 support
mahaase Mar 5, 2021
50be7ac
devel/sandbox: adapt after environment var fix of bob
mahaase Mar 8, 2021
c532c9c
libs/compat/glibc: removed unnecessary patch
mahaase Mar 8, 2021
3ec2468
recipes/devel/gcc: added --with-linker-hash-style=gnu to gcc build pa…
mahaase May 10, 2021
0c2744c
devel/sandbox: small fix, set default values
mahaase May 19, 2021
16bde15
prototype: aarch64 sandbox (configurable sandbox+toolchain)
mahaase Mar 1, 2021
ac84124
libs/compat/glibc: fixes for aarch64, maybe included in 2.27, if upda…
mahaase Mar 2, 2021
41e4dd0
fixed the usage of a cross-built sandbox
mahaase Mar 2, 2021
1b8a41a
test: added a specific test-target for aarch64
mahaase Mar 5, 2021
5378e6e
libs/glibc: added another patch for aarch64 support
mahaase Mar 5, 2021
51cbbff
libs/compat/glibc: removed unnecessary patch
mahaase Mar 8, 2021
57858f3
prototype: aarch64 sandbox (configurable sandbox+toolchain)
mahaase Mar 1, 2021
6dbfbff
devel/cross-toolchain: autoconf_target aarch64-cross-linux-gnu for aa…
mahaase Jul 13, 2021
83dcb5d
classes/cmake added sysroot to find_root_paths
mahaase Jul 15, 2021
8cd54bc
classes/cmake: add sysroot just for gcc/g++
mahaase Jul 26, 2021
671e671
classes/cmake: fixed bash if syntax
mahaase Jul 26, 2021
213db25
cleanup and rebase with master
mahaase Jun 3, 2022
549193b
fixed wrong rebasement fixes
mahaase Jun 3, 2022
1b3f8b1
devel/git: add cross-compilation support
mahaase Jun 3, 2022
bd0b265
.reintegrated upstream fixes
mahaase Jun 3, 2022
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/cmake.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ buildSetup: |
-DCMAKE_BUILD_TYPE=Bob \
-DCMAKE_INSTALL_PREFIX="$CMAKE_INSTALL_PREFIX" \
-DCMAKE_INSTALL_SYSCONFDIR="$CMAKE_INSTALL_SYSCONFDIR" \
-DCMAKE_INSTALL_LIBDIR="lib" \
-DBUILD_SHARED_LIBS=$BUILD_SHARED_LIBS \
-DCMAKE_MSVC_RUNTIME_LIBRARY="" \
"${@:2}"
Expand Down
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 @@ -71,4 +71,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"
16 changes: 12 additions & 4 deletions recipes/devel/git.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,20 @@ checkoutSCM:
digestSHA1: "851537fc03f5a99419ef20e9b836de965c7928bd"
extract: False

buildTools: [target-toolchain, curl]
buildVars: [PKG_VERSION, AUTOCONF_HOST,
CPPFLAGS, CFLAGS, LDFLAGS]
buildTools: [target-toolchain, curl, 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"

EXTRA=( )
if [[ "${AUTOCONF_BUILD:-unknown}" != "${AUTOCONF_HOST:-${AUTOCONF_BUILD:-unknown}}" ]]; then
export ac_cv_fread_reads_directories=yes
export ac_cv_snprintf_returns_bogus=no
EXTRA+=( "--build=${AUTOCONF_BUILD}" )
fi

mkdir -p install
tar -xf $1/git-${PKG_VERSION}.tar.xz

Expand All @@ -36,7 +43,8 @@ buildScript: |
--prefix=/usr \
--with-curl=${BOB_DEP_PATHS[net::curl-dev]}/usr \
--without-python \
--without-expat
--without-expat \
${EXTRA:+${EXTRA[@]}}
makeParallel
make DESTDIR=${PWD}/../install install
popd
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)}"
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

1 change: 1 addition & 0 deletions recipes/libs/compat/glibc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ buildScript: |
--with-headers=$2/usr/include \
--enable-obsolete-rpc \
--libdir=/usr/lib \
--disable-werror \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? I'd rather add a patch than disabling werror altogether...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while cross-compiling for aarch64 i had an error: -Werror=missing-attributes
with --disable-werror i was able to build it successfully

$EXTRA
touch .configure.stamp
fi
Expand Down
1 change: 1 addition & 0 deletions recipes/libs/expat.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ checkoutSCM:
digestSHA256: a00ae8a6b96b63a3910ddc1100b1a7ef50dc26dceb65ced18ded31ab392f132b
stripComponents: 1

buildTools: [host-toolchain]
buildScript: |
autotoolsBuild $1

Expand Down
3 changes: 2 additions & 1 deletion recipes/libs/libcap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ checkoutSCM:
extract: False

buildTools: [host-toolchain, target-toolchain]
buildVars: [AR, CC, OBJCOPY, RANLIB, PKG_VERSION]
buildVars: [AR, CC, OBJCOPY, RANLIB, PKG_VERSION, CROSS_COMPILE]
buildScript: |
tar -xf $1/libcap-${PKG_VERSION}.tar.xz
mkdir -p install
Expand All @@ -21,6 +21,7 @@ buildScript: |
AR=$AR \
CC=$CC \
OBJCOPY=$OBJCOPY \
${CROSS_COMPILE:+BUILD_CC=gcc} \
RANLIB=$RANLIB \
RAISE_SETFCAP=no \
DESTDIR="$PWD/install" \
Expand Down
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