Should merge #1021 first and then update Docker image name reference
Changelog
Use GCC to cross-compile Linux arm64 binaries in CI
Fixed compilation of remill with GCC
Use new Docker image as a base with installed cross-compilation dependencies
Patch LLVM 15 and 16 to compile for target architecture (ports/llvm-{15,16}/portfile.cmake)
Patch LLVM 15 and 16 to pass the correct compiler for cross-compiling and native binary builds (ports/llvm-{15,16}/portfile.cmake)
Update to LLVM 16.0.4
Patch protobuf port to always build target executable (ports/protobuf/portfile.cmake)
Patch XED to remove usage of -m architecture flags that broke during ARM cross-compilation (ports/xed/0001-mbuild-remove-m64.patch)
Patch glog to fix linker error between GCC and Clang (ports/glog/fix_logstream_linker_error.patch)
Patch vcpkg to correctly find compatible host executables to run
Use GCC to compile compatible lifting tools
No longer force clang as the default compiler when using build_dependencies.sh script
Notes
I went through a lot of trial and error trying to first crosscompile using clang, but this method does not seem to be well-tested. Instead, I am using GCC to compile everything, which shouldn't be a problem.
I also fixed compilation of remill with GCC.
I had to modify vcpkg Linux toolchain to properly detect cross-compilation and fix LLVM builds. Ideally, this goes to upstream, but I have been having issues getting cross-compilation fixes merged.
Should merge #1021 first and then update Docker image name reference
Changelog
ports/llvm-{15,16}/portfile.cmake
)ports/llvm-{15,16}/portfile.cmake
)ports/protobuf/portfile.cmake
)-m
architecture flags that broke during ARM cross-compilation (ports/xed/0001-mbuild-remove-m64.patch
)ports/glog/fix_logstream_linker_error.patch
)build_dependencies.sh
scriptNotes
I went through a lot of trial and error trying to first crosscompile using clang, but this method does not seem to be well-tested. Instead, I am using GCC to compile everything, which shouldn't be a problem.
I also fixed compilation of remill with GCC.
I had to modify vcpkg Linux toolchain to properly detect cross-compilation and fix LLVM builds. Ideally, this goes to upstream, but I have been having issues getting cross-compilation fixes merged.
TODO: