mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-01 04:24:21 +00:00
@@ -0,0 +1,40 @@
|
|||||||
|
diff --git a/cmake/ConfigureOpenSSL.cmake b/cmake/ConfigureOpenSSL.cmake
|
||||||
|
index 3012e05..2ae23ff 100644
|
||||||
|
--- a/cmake/ConfigureOpenSSL.cmake
|
||||||
|
+++ b/cmake/ConfigureOpenSSL.cmake
|
||||||
|
@@ -108,7 +108,8 @@ function(configure_openssl)
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT "${CONFIGURE_OPTIONS_OLD}" STREQUAL "")
|
||||||
|
- if(CONFIGURE_OPTIONS STREQUAL CONFIGURE_OPTIONS_OLD)
|
||||||
|
+ # TODO(lizzie): Emscripten has issues with rebuilding due to the wrapper it uses
|
||||||
|
+ if(CMAKE_SYSTEM_NAME MATCHES "Emscripten" OR CONFIGURE_OPTIONS STREQUAL CONFIGURE_OPTIONS_OLD)
|
||||||
|
message(STATUS "Found previous configure results. Don't perform configuration")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
@@ -134,10 +135,24 @@ function(configure_openssl)
|
||||||
|
set(VERBOSE_OPTION OUTPUT_QUIET)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+ if (CMAKE_SYSTEM_NAME MATCHES "Emscripten")
|
||||||
|
+ set(EMSCRIPTEN_CMAKE_WRAPPER "emcmake")
|
||||||
|
+ find_program(EMCC emcc REQUIRED)
|
||||||
|
+ set(EMSCRIPTEN_LINKER ${EMCC})
|
||||||
|
+ list(APPEND CONFIGURE_COMMAND wasm64)
|
||||||
|
+ else()
|
||||||
|
+ set(EMSCRIPTEN_CMAKE_WRAPPER "")
|
||||||
|
+ set(EMSCRIPTEN_LINKER ${CMAKE_LINKER})
|
||||||
|
+ endif ()
|
||||||
|
+
|
||||||
|
execute_process(
|
||||||
|
- COMMAND ${CMAKE_COMMAND} -E env
|
||||||
|
+ COMMAND ${EMSCRIPTEN_CMAKE_WRAPPER} ${CMAKE_COMMAND} -E env
|
||||||
|
"CFLAGS=${CMAKE_C_FLAGS}"
|
||||||
|
"CXXFLAGS=${CMAKE_CXX_FLAGS}"
|
||||||
|
+ "LDFLAGS=${CMAKE_CXX_LINK_FLAGS}"
|
||||||
|
+ "CC=${CMAKE_C_COMPILER}"
|
||||||
|
+ "CXX=${CMAKE_CXX_COMPILER}"
|
||||||
|
+ "LD=${EMSCRIPTEN_LINKER}"
|
||||||
|
${CONFIGURE_COMMAND}
|
||||||
|
WORKING_DIRECTORY ${CONFIGURE_BUILD_DIR}
|
||||||
|
${VERBOSE_OPTION}
|
||||||
+2
-1
@@ -202,7 +202,8 @@
|
|||||||
"0001-cpmutil-compat.patch",
|
"0001-cpmutil-compat.patch",
|
||||||
"0002-use-ccache.patch",
|
"0002-use-ccache.patch",
|
||||||
"0003-use-cmake-compiler-flags.patch",
|
"0003-use-cmake-compiler-flags.patch",
|
||||||
"0004-use-shell-wrapper.patch"
|
"0004-use-shell-wrapper.patch",
|
||||||
|
"0005-cross-compile.patch"
|
||||||
],
|
],
|
||||||
"repo": "jimmy-park/openssl-cmake",
|
"repo": "jimmy-park/openssl-cmake",
|
||||||
"version": "3.6.2"
|
"version": "3.6.2"
|
||||||
|
|||||||
+25
-4
@@ -6,10 +6,31 @@ General guide for cross compiling.
|
|||||||
|
|
||||||
A painless guide for cross compilation (or to test NCE) from a x86_64 system without polluting your main.
|
A painless guide for cross compilation (or to test NCE) from a x86_64 system without polluting your main.
|
||||||
|
|
||||||
- Install QEMU: `sudo pkg install qemu`
|
```sh
|
||||||
- Download Debian 13: `wget https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/debian-13.0.0-arm64-netinst.iso`
|
#!/bin/sh
|
||||||
- Create a system disk: `qemu-img create -f qcow2 debian-13-arm64-ci.qcow2 30G`
|
ISO_FILE="debian-13.0.0-arm64-netinst.iso"
|
||||||
- Run the VM: `qemu-system-aarch64 -M virt -m 2G -cpu max -bios /usr/local/share/qemu/edk2-aarch64-code.fd -drive if=none,file=debian-13.0.0-arm64-netinst.iso,format=raw,id=cdrom -device scsi-cd,drive=cdrom -drive if=none,file=debian-13-arm64-ci.qcow2,id=hd0,format=qcow2 -device virtio-blk-device,drive=hd0 -device virtio-gpu-pci -device usb-ehci -device usb-kbd -device intel-hda -device hda-output -nic user,model=virtio-net-pci`
|
DISK_FILE="debian-13-arm64-ci.qcow2"
|
||||||
|
which -- qemu-system-aarch64 || sudo pkg install qemu
|
||||||
|
[ -f "$ISO_FILE" ] || wget https://cdimage.debian.org/debian-cd/current/arm64/iso-cd/$ISO_FILE
|
||||||
|
[ -f "$DISK_FILE" ] || qemu-img create -f qcow2 "$DISK_FILE" 30G
|
||||||
|
QEMU_FLAGS=(
|
||||||
|
-M virt
|
||||||
|
-m 2G
|
||||||
|
-cpu max
|
||||||
|
-bios /usr/local/share/qemu/edk2-aarch64-code.fd
|
||||||
|
-drive if=none,file=$ISO_FILE,format=raw,id=cdrom
|
||||||
|
-drive if=none,file=$DISK_FILE,id=hd0,format=qcow2
|
||||||
|
-device scsi-cd,drive=cdrom
|
||||||
|
-device virtio-blk-device,drive=hd0
|
||||||
|
-device virtio-gpu-pci
|
||||||
|
-device usb-ehci
|
||||||
|
-device usb-kbd
|
||||||
|
-device intel-hda
|
||||||
|
-device hda-output
|
||||||
|
-nic user,model=virtio-net-pci
|
||||||
|
)
|
||||||
|
qemu-system-aarch64 "${QEMU_FLAGS[@]}"
|
||||||
|
```
|
||||||
|
|
||||||
## Gentoo
|
## Gentoo
|
||||||
|
|
||||||
|
|||||||
+5
-5
@@ -101,6 +101,11 @@ endfunction()
|
|||||||
# ia64 exists
|
# ia64 exists
|
||||||
# the rest exist, but are probably less popular than ia64
|
# the rest exist, but are probably less popular than ia64
|
||||||
|
|
||||||
|
detect_architecture_symbols(
|
||||||
|
ARCH wasm
|
||||||
|
SYMBOLS
|
||||||
|
"__EMSCRIPTEN__")
|
||||||
|
|
||||||
detect_architecture_symbols(
|
detect_architecture_symbols(
|
||||||
ARCH arm64
|
ARCH arm64
|
||||||
SYMBOLS
|
SYMBOLS
|
||||||
@@ -203,11 +208,6 @@ detect_architecture_symbols(
|
|||||||
"__loongarch__"
|
"__loongarch__"
|
||||||
"__loongarch64")
|
"__loongarch64")
|
||||||
|
|
||||||
detect_architecture_symbols(
|
|
||||||
ARCH wasm
|
|
||||||
SYMBOLS
|
|
||||||
"__EMSCRIPTEN__")
|
|
||||||
|
|
||||||
# "generic" target
|
# "generic" target
|
||||||
# If you have reached this point, you're on some as-of-yet unsupported architecture.
|
# If you have reached this point, you're on some as-of-yet unsupported architecture.
|
||||||
# See the docs up above for known unsupported architectures
|
# See the docs up above for known unsupported architectures
|
||||||
|
|||||||
@@ -197,15 +197,15 @@ void EmitA32Terminal(biscuit::Assembler& as, EmitContext& ctx, IR::Term::CheckHa
|
|||||||
|
|
||||||
void EmitA32LeafTerminal(biscuit::Assembler& as, EmitContext& ctx, IR::Term::LeafTerminal terminal, IR::LocationDescriptor initial_location, bool is_single_step) {
|
void EmitA32LeafTerminal(biscuit::Assembler& as, EmitContext& ctx, IR::Term::LeafTerminal terminal, IR::LocationDescriptor initial_location, bool is_single_step) {
|
||||||
if (auto const x = std::get_if<IR::Term::ReturnToDispatch>(&terminal))
|
if (auto const x = std::get_if<IR::Term::ReturnToDispatch>(&terminal))
|
||||||
return EmitA32LeafTerminal(as, ctx, *x, initial_location, is_single_step);
|
return EmitA32Terminal(as, ctx, *x, initial_location, is_single_step);
|
||||||
if (auto const x = std::get_if<IR::Term::LinkBlock>(&terminal))
|
if (auto const x = std::get_if<IR::Term::LinkBlock>(&terminal))
|
||||||
return EmitA32LeafTerminal(as, ctx, *x, initial_location, is_single_step);
|
return EmitA32Terminal(as, ctx, *x, initial_location, is_single_step);
|
||||||
if (auto const x = std::get_if<IR::Term::LinkBlockFast>(&terminal))
|
if (auto const x = std::get_if<IR::Term::LinkBlockFast>(&terminal))
|
||||||
return EmitA32LeafTerminal(as, ctx, *x, initial_location, is_single_step);
|
return EmitA32Terminal(as, ctx, *x, initial_location, is_single_step);
|
||||||
if (auto const x = std::get_if<IR::Term::PopRSBHint>(&terminal))
|
if (auto const x = std::get_if<IR::Term::PopRSBHint>(&terminal))
|
||||||
return EmitA32LeafTerminal(as, ctx, *x, initial_location, is_single_step);
|
return EmitA32Terminal(as, ctx, *x, initial_location, is_single_step);
|
||||||
if (auto const x = std::get_if<IR::Term::FastDispatchHint>(&terminal))
|
if (auto const x = std::get_if<IR::Term::FastDispatchHint>(&terminal))
|
||||||
return EmitA32LeafTerminal(as, ctx, *x, initial_location, is_single_step);
|
return EmitA32Terminal(as, ctx, *x, initial_location, is_single_step);
|
||||||
UNREACHABLE();
|
UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user