Skip to content
This repository has been archived by the owner on May 4, 2024. It is now read-only.

Commit

Permalink
cross-compilation settings for arm-apple-darwin ("M1 Macs")
Browse files Browse the repository at this point in the history
Signed-off-by: KOSHIKAWA Kenichi <reishoku.misc@pm.me>
  • Loading branch information
reishoku committed Jan 12, 2022
1 parent 7d5463a commit 4ffc5f7
Showing 1 changed file with 34 additions and 7 deletions.
41 changes: 34 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,47 @@ jobs:
ifconfig
- name: Install build dependencies of VDE
run: brew install autoconf automake
- name: Install VDE
- name: Make and Install VDE
run: |
git clone https://github.com/virtualsquare/vde-2.git /tmp/vde-2
cd /tmp/vde-2
# Dec 12, 2021
git checkout 74278b9b7cf816f0356181f387012fdeb6d65b52
autoreconf -fis
# compile for x86_64
./configure --prefix=/opt/vde
make
sudo make install
- name: Make
run: make PREFIX=/opt/vde
- name: Install
run: sudo make PREFIX=/opt/vde install
make PREFIX=/opt/vde
sudo make PREFIX=/opt/vde install
# cleanup
make distclean
# cross-compile for arm64
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export CC=$(xcrun --sdk macosx --find clang)
export CXX=$(xcrun --sdk macosx --find clang++)
export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
export CXXFLAGS=$CFLAGS
./configure --prefix=/opt/vde.arm64 --host=arm-apple-darwin --target=arm-apple-darwin --build=x86_64-apple-darwin
make PREFIX=/opt/vde.arm64
sudo make PREFIX=/opt/vde.arm64 install
unset SDKROOT CC CXX CFLAGS CXXFLAGS
- name: Make and Install vde_vmnet (x86_64)
run: |
git clone https://github.com/lima-vm/vde_vmnet.git /tmp/vde_vmnet
cd /tmp/vde_vmnet
make PREFIX=/opt/vde
sudo make PREFIX=/opt/vde install
- name: Cleanup
run: |
make clean
- name: Make and Install vde_vmnet (arm64)
run: |
export SDKROOT=$(xcrun --sdk macosx --show-sdk-path)
export CC=$(xcrun --sdk macosx --find clang)
export CXX=$(xcrun --sdk macosx --find clang++)
export CFLAGS="-arch arm64e -isysroot $SDKROOT -Wno-error=implicit-function-declaration"
export CXXFLAGS=$CFLAGS
make PREFIX=/opt/vde.arm64
sudo make PREFIX=/opt/vde.arm64 install
- name: Print launchd status (shared mode)
run: launchctl print system/io.github.lima-vm.vde_vmnet.plist
- name: Install test dependencies
Expand Down

0 comments on commit 4ffc5f7

Please sign in to comment.