summaryrefslogtreecommitdiff
path: root/Toolchain
diff options
context:
space:
mode:
Diffstat (limited to 'Toolchain')
-rw-r--r--Toolchain/Stubs/README.md21
-rw-r--r--Toolchain/Stubs/i686clang/libc.sobin0 -> 67712 bytes
-rw-r--r--Toolchain/Stubs/i686clang/libdl.sobin0 -> 996 bytes
-rw-r--r--Toolchain/Stubs/i686clang/libm.sobin0 -> 4852 bytes
-rw-r--r--Toolchain/Stubs/i686clang/libpthread.sobin0 -> 4952 bytes
-rw-r--r--Toolchain/Stubs/x86_64clang/libc.sobin0 -> 80216 bytes
-rw-r--r--Toolchain/Stubs/x86_64clang/libdl.sobin0 -> 1384 bytes
-rw-r--r--Toolchain/Stubs/x86_64clang/libm.sobin0 -> 6520 bytes
-rw-r--r--Toolchain/Stubs/x86_64clang/libpthread.sobin0 -> 6160 bytes
9 files changed, 21 insertions, 0 deletions
diff --git a/Toolchain/Stubs/README.md b/Toolchain/Stubs/README.md
new file mode 100644
index 0000000000..c5bfe89a57
--- /dev/null
+++ b/Toolchain/Stubs/README.md
@@ -0,0 +1,21 @@
+# Library stubs
+
+This directory contains stubs for SerenityOS libraries (LibC, LibM, LibDl, LibPthread)
+that are referenced from the LLVM runtime libraries. These are needed by the linker
+in order to add the required `DT_NEEDED` entries.
+
+## Do these need to be updated?
+
+Generally, no. LLVM does not use the header files to decide which functionality it can
+use. After adding a new function to a header, you don't have to worry about LLVM
+toolchain builds failing because the symbol is not present in the stubs.
+
+## How to generate these?
+
+First, you need to have a working SerenityOS installation that's been built by the
+Clang toolchain. Then, using the `llvm-ifs` tool, these libraries need to be converted
+into a stripped-down stub form. To do that, run the following command:
+
+```sh
+Toolchain/Local/clang/bin/llvm-ifs --output-format=ELF --output=<path-to-stub> <path-to-original>
+```
diff --git a/Toolchain/Stubs/i686clang/libc.so b/Toolchain/Stubs/i686clang/libc.so
new file mode 100644
index 0000000000..99d7659f48
--- /dev/null
+++ b/Toolchain/Stubs/i686clang/libc.so
Binary files differ
diff --git a/Toolchain/Stubs/i686clang/libdl.so b/Toolchain/Stubs/i686clang/libdl.so
new file mode 100644
index 0000000000..ab3b2af601
--- /dev/null
+++ b/Toolchain/Stubs/i686clang/libdl.so
Binary files differ
diff --git a/Toolchain/Stubs/i686clang/libm.so b/Toolchain/Stubs/i686clang/libm.so
new file mode 100644
index 0000000000..fe2a0a6d56
--- /dev/null
+++ b/Toolchain/Stubs/i686clang/libm.so
Binary files differ
diff --git a/Toolchain/Stubs/i686clang/libpthread.so b/Toolchain/Stubs/i686clang/libpthread.so
new file mode 100644
index 0000000000..557e7200dc
--- /dev/null
+++ b/Toolchain/Stubs/i686clang/libpthread.so
Binary files differ
diff --git a/Toolchain/Stubs/x86_64clang/libc.so b/Toolchain/Stubs/x86_64clang/libc.so
new file mode 100644
index 0000000000..373cbddcec
--- /dev/null
+++ b/Toolchain/Stubs/x86_64clang/libc.so
Binary files differ
diff --git a/Toolchain/Stubs/x86_64clang/libdl.so b/Toolchain/Stubs/x86_64clang/libdl.so
new file mode 100644
index 0000000000..18638c1063
--- /dev/null
+++ b/Toolchain/Stubs/x86_64clang/libdl.so
Binary files differ
diff --git a/Toolchain/Stubs/x86_64clang/libm.so b/Toolchain/Stubs/x86_64clang/libm.so
new file mode 100644
index 0000000000..16cc84faef
--- /dev/null
+++ b/Toolchain/Stubs/x86_64clang/libm.so
Binary files differ
diff --git a/Toolchain/Stubs/x86_64clang/libpthread.so b/Toolchain/Stubs/x86_64clang/libpthread.so
new file mode 100644
index 0000000000..cf839e8d80
--- /dev/null
+++ b/Toolchain/Stubs/x86_64clang/libpthread.so
Binary files differ