-
Notifications
You must be signed in to change notification settings - Fork 317
Provide arm64 linux binaries #1599
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
Merged
Merged
Changes from 5 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
89cff05
add Docker, sources.list, and toolchain.cmake
324bad5
Merge remote-tracking branch 'upstream/main' into build_arm64
f8a5d45
hookup new binary to signing workflow
25f1fbd
add a arm64 ci runs
f1d9ac2
fix ubuntu version
341e129
add test presets
097aa88
skip nuget export test on arm64 to bypass mono dep
f948f63
use RuntimeInformation to determine arch
dcc2ce4
hookup toolchain file
8964389
add glibc-devel
d2e2e08
update signing.yml to use new image with glibc-devel package
80a219a
fix broken link and add newline
f0a8494
add libc6-devel
ef6caad
add libc6-devel from crossrootfs
8bd0e85
add -L/crossrootfs/arm64/lib/aarch64-linux-gnu
8b15750
fix syntax bug in signing.yml
17d874f
remove redundant toolchain linker flags from toolchain
379ff90
run end to end tests for nuget
7aa6b6d
use newer image
b824a73
undo merge
08bce98
install mono-complete for arm64-linux
9615efd
restore commands.export.ps1
cd12a11
Add some missing vcpkg-glibc-arm64s causing the file to be missing fr…
BillyONeal eae41ab
Merge remote-tracking branch 'origin/main' into build_arm64
BillyONeal 2b8177a
Bill can't fix freaking merge conflicts, Bill is an idiot
BillyONeal 4b12fb8
Bill still can't fix merge conflicts.
BillyONeal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# This infrastructure is adapted from that the .NET team uses, see | ||
# https://github.com/dotnet/dotnet-buildtools-prereqs-docker | ||
# and | ||
# https://github.com/dotnet/runtime/blob/main/docs/workflow/building/coreclr/linux-instructions.md | ||
JavierMatosD marked this conversation as resolved.
Show resolved
Hide resolved
|
||
FROM mcr.microsoft.com/cbl-mariner/base/core:2.0 | ||
|
||
RUN tdnf install -y \ | ||
# Common utilities | ||
ca-certificates \ | ||
git \ | ||
tar \ | ||
curl \ | ||
# Build tools | ||
binutils \ | ||
cmake \ | ||
ninja-build \ | ||
# Rootfs build dependencies | ||
bzip2-devel \ | ||
debootstrap \ | ||
libarchive-devel \ | ||
openssl-devel | ||
|
||
# Obtain ubuntu package signing key (for use by debootstrap) | ||
# 1. Download the ubuntu keyrings | ||
RUN curl -L -o ubuntu-keyring_2021.03.26.tar.gz https://mirrors.edge.kernel.org/ubuntu/pool/main/u/ubuntu-keyring/ubuntu-keyring_2021.03.26.tar.gz && \ | ||
# 2. Check that they have the correct SHA | ||
echo "492eed5c06408c6f632577adb0796130af5d6542013ef418f47187a209e49bb1 ubuntu-keyring_2021.03.26.tar.gz" | sha256sum -c && \ | ||
tar xf ubuntu-keyring_2021.03.26.tar.gz && \ | ||
rm ubuntu-keyring_2021.03.26.tar.gz && \ | ||
# 3. Install the needed keyring and delete the rest | ||
pushd ubuntu-keyring-2021.03.26 && \ | ||
mkdir -p /usr/share/keyrings && \ | ||
mv keyrings/ubuntu-archive-keyring.gpg /usr/share/keyrings && \ | ||
popd && \ | ||
rm -r ubuntu-keyring-2021.03.26 | ||
|
||
# Build the 'crossrootfs' | ||
# Note that we only need libstdc++-9-dev rather than all of g++-9, but choosing g++-9 | ||
# gets other optional dependencies to agree with g++-9 rather than older gccs | ||
RUN debootstrap "--variant=minbase" --force-check-gpg --arch arm64 xenial /crossrootfs/arm64 http://ports.ubuntu.com/ubuntu-ports/ | ||
COPY sources.list . | ||
RUN chroot /crossrootfs/arm64 apt-get clean && \ | ||
cp /etc/resolv.conf /crossrootfs/arm64/etc/resolv.conf && \ | ||
cp sources.list /crossrootfs/arm64/etc/apt/sources.list && \ | ||
chroot /crossrootfs/arm64 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 60C317803A41BA51845E371A1E9377A2BA9EF27F && \ | ||
chroot /crossrootfs/arm64 apt-get update -o Acquire::CompressionTypes::Order::=gz | ||
|
||
# Repeated runs of apt-get install workaround 'hash sum mismatch' errors | ||
# (This is also why these are a separate cache layer) | ||
RUN chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" || \ | ||
chroot /crossrootfs/arm64 apt-get install -y build-essential symlinks "g++-9" && \ | ||
chroot /crossrootfs/arm64 symlinks -cr /usr && \ | ||
chroot /crossrootfs/arm64 apt-get clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
deb http://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu xenial main | ||
deb-src http://ppa.launchpadcontent.net/ubuntu-toolchain-r/test/ubuntu xenial main | ||
|
||
deb http://ports.ubuntu.com/ubuntu-ports xenial main restricted universe | ||
deb-src http://ports.ubuntu.com/ubuntu-ports xenial main restricted universe | ||
|
||
deb http://ports.ubuntu.com/ubuntu-ports xenial-updates main restricted universe | ||
deb-src http://ports.ubuntu.com/ubuntu-ports xenial-updates main restricted universe | ||
|
||
deb http://ports.ubuntu.com/ubuntu-ports xenial-backports main restricted | ||
deb-src http://ports.ubuntu.com/ubuntu-ports xenial-backports main restricted | ||
|
||
deb http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted universe multiverse | ||
deb-src http://ports.ubuntu.com/ubuntu-ports xenial-security main restricted universe multiverse |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set(CMAKE_SYSTEM_NAME Linux) | ||
set(LINUX 1) | ||
set(CMAKE_SYSTEM_VERSION 1) | ||
set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
set(CMAKE_SYSROOT "/crossrootfs/arm64") | ||
set(COMMON_ARGS "-B/crossrootfs/arm64/usr/lib/aarch64-linux-gnu/ -isystem /crossrootfs/arm64/usr/lib/gcc/aarch64-linux-gnu/9/include-fixed -isystem /crossrootfs/arm64/usr/lib/gcc/aarch64-linux-gnu/9/include -isystem /crossrootfs/arm64/usr/include/aarch64-linux-gnu -isystem /crossrootfs/arm64/usr/include -static-libgcc -nostdinc") | ||
set(CMAKE_C_FLAGS_INIT "${COMMON_ARGS}") | ||
set(CMAKE_CXX_FLAGS_INIT "-isystem /crossrootfs/arm64/usr/include/aarch64-linux-gnu/c++/9 -isystem /crossrootfs/arm64/usr/include/c++/9 ${COMMON_ARGS} -static-libstdc++ -L/crossrootfs/arm64/usr/lib/gcc/aarch64-linux-gnu/9/") | ||
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/arm64/usr") | ||
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/arm64/usr") | ||
set(CMAKE_ASM_COMPILER_EXTERNAL_TOOLCHAIN "/crossrootfs/arm64/usr") | ||
function(add_toolchain_linker_flag Flag) | ||
set("CMAKE_EXE_LINKER_FLAGS_INIT" "${CMAKE_EXE_LINKER_FLAGS_INIT} ${Flag}" PARENT_SCOPE) | ||
set("CMAKE_SHARED_LINKER_FLAGS_INIT" "${CMAKE_SHARED_LINKER_FLAGS_INIT} ${Flag}" PARENT_SCOPE) | ||
endfunction() | ||
|
||
add_toolchain_linker_flag("-Wl,--rpath-link=/crossrootfs/arm64/lib/aarch64-linux-gnu") | ||
add_toolchain_linker_flag("-Wl,--rpath-link=/crossrootfs/arm64/usr/lib/aarch64-linux-gnu") | ||
|
||
set(CMAKE_C_COMPILER /usr/bin/gcc) | ||
set(CMAKE_CXX_COMPILER /usr/bin/g++) | ||
|
||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.