summaryrefslogtreecommitdiff
path: root/Userland/Libraries
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2021-08-27 15:23:43 -0400
committerLinus Groh <mail@linusgroh.de>2021-08-28 14:43:07 +0100
commitbbad4758b2ca97d29044b593ebb0447bbdbc2c0a (patch)
tree32572bba7a56ff5917d463c5425211c6377cd6b1 /Userland/Libraries
parenta43ad0e70691f6a39df04312493f0cd32cb6b6f3 (diff)
downloadserenity-bbad4758b2ca97d29044b593ebb0447bbdbc2c0a.zip
CMake: Let `Meta/serenity.sh run aarch64` make it past cmake
This adds just enough scaffolding to make cmake succeed. The build falls over immediately.
Diffstat (limited to 'Userland/Libraries')
-rw-r--r--Userland/Libraries/LibC/CMakeLists.txt7
-rw-r--r--Userland/Libraries/LibC/arch/aarch64/crti.S21
-rw-r--r--Userland/Libraries/LibC/arch/aarch64/crtn.S13
-rw-r--r--Userland/Libraries/LibC/arch/aarch64/setjmp.S15
-rw-r--r--Userland/Libraries/LibELF/Arch/aarch64/entry.S12
-rw-r--r--Userland/Libraries/LibELF/Arch/aarch64/plt_trampoline.S13
6 files changed, 80 insertions, 1 deletions
diff --git a/Userland/Libraries/LibC/CMakeLists.txt b/Userland/Libraries/LibC/CMakeLists.txt
index 1022ec944c..5ad420f047 100644
--- a/Userland/Libraries/LibC/CMakeLists.txt
+++ b/Userland/Libraries/LibC/CMakeLists.txt
@@ -67,7 +67,12 @@ set(LIBC_SOURCES
file(GLOB AK_SOURCES CONFIGURE_DEPENDS "../../../AK/*.cpp")
file(GLOB ELF_SOURCES CONFIGURE_DEPENDS "../LibELF/*.cpp")
-if ("${SERENITY_ARCH}" STREQUAL "i686")
+if ("${SERENITY_ARCH}" STREQUAL "aarch64")
+ set(ASM_SOURCES "arch/aarch64/setjmp.S")
+ set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/aarch64/entry.S ../LibELF/Arch/aarch64/plt_trampoline.S)
+ set(CRTI_SOURCE "arch/aarch64/crti.S")
+ set(CRTN_SOURCE "arch/aarch64/crtn.S")
+elseif ("${SERENITY_ARCH}" STREQUAL "i686")
set(ASM_SOURCES "arch/i386/setjmp.S")
set(ELF_SOURCES ${ELF_SOURCES} ../LibELF/Arch/i386/entry.S ../LibELF/Arch/i386/plt_trampoline.S)
set(CRTI_SOURCE "arch/i386/crti.S")
diff --git a/Userland/Libraries/LibC/arch/aarch64/crti.S b/Userland/Libraries/LibC/arch/aarch64/crti.S
new file mode 100644
index 0000000000..660ba90bf6
--- /dev/null
+++ b/Userland/Libraries/LibC/arch/aarch64/crti.S
@@ -0,0 +1,21 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+.section .init, "ax", @progbits
+.p2align 2
+.global _init
+.type _init, @function
+_init:
+ # FIXME: Possibly incomplete.
+ ret
+
+.section .fini, "ax", @progbits
+.p2align 4
+.global _fini
+.type _fini, @function
+_fini:
+ # FIXME: Possibly incomplete.
+ ret
diff --git a/Userland/Libraries/LibC/arch/aarch64/crtn.S b/Userland/Libraries/LibC/arch/aarch64/crtn.S
new file mode 100644
index 0000000000..aea4d4d133
--- /dev/null
+++ b/Userland/Libraries/LibC/arch/aarch64/crtn.S
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+.section .init, "ax", @progbits
+ # FIXME: Possibly incomplete.
+ ret
+
+.section .fini, "ax", @progbits
+ # FIXME: Possibly incomplete.
+ ret
diff --git a/Userland/Libraries/LibC/arch/aarch64/setjmp.S b/Userland/Libraries/LibC/arch/aarch64/setjmp.S
new file mode 100644
index 0000000000..6ae11c4151
--- /dev/null
+++ b/Userland/Libraries/LibC/arch/aarch64/setjmp.S
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+.global setjmp
+setjmp:
+ # FIXME: Possibly incomplete.
+ ret
+
+.global longjmp
+longjmp:
+ # FIXME: Possibly incomplete.
+ ret
diff --git a/Userland/Libraries/LibELF/Arch/aarch64/entry.S b/Userland/Libraries/LibELF/Arch/aarch64/entry.S
new file mode 100644
index 0000000000..2e9620e498
--- /dev/null
+++ b/Userland/Libraries/LibELF/Arch/aarch64/entry.S
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+.globl _invoke_entry
+.hidden _invoke_entry
+.type _invoke_entry,@function
+_invoke_entry: # (argc, argv, envp, entry)
+ # FIXME: Possibly incomplete.
+ ret
diff --git a/Userland/Libraries/LibELF/Arch/aarch64/plt_trampoline.S b/Userland/Libraries/LibELF/Arch/aarch64/plt_trampoline.S
new file mode 100644
index 0000000000..016266f2c8
--- /dev/null
+++ b/Userland/Libraries/LibELF/Arch/aarch64/plt_trampoline.S
@@ -0,0 +1,13 @@
+/*
+ * Copyright (c) 2021, Nico Weber <thakis@chromium.org>
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+.p2align 4
+.globl _plt_trampoline
+.hidden _plt_trampoline
+.type _plt_trampoline,@function
+_plt_trampoline: # (object, relocation_index)
+ # FIXME: Possibly incomplete.
+ ret