summaryrefslogtreecommitdiffstats
path: root/usr/klibc/arch/loongarch64/MCONFIG
diff options
context:
space:
mode:
Diffstat (limited to 'usr/klibc/arch/loongarch64/MCONFIG')
-rw-r--r--usr/klibc/arch/loongarch64/MCONFIG23
1 files changed, 23 insertions, 0 deletions
diff --git a/usr/klibc/arch/loongarch64/MCONFIG b/usr/klibc/arch/loongarch64/MCONFIG
new file mode 100644
index 0000000..0ef5eae
--- /dev/null
+++ b/usr/klibc/arch/loongarch64/MCONFIG
@@ -0,0 +1,23 @@
+# -*- makefile -*-
+#
+# arch/loongarch64/MCONFIG
+#
+# Special rules for this architecture. Note that this is actually
+# included from the main Makefile, and that pathnames should be
+# accordingly.
+#
+
+KLIBCOPTFLAGS += -Os -fomit-frame-pointer
+KLIBCBITSIZE = 64
+
+# Extra linkflags when building the shared version of the library
+# This address needs to be reachable using normal inter-module
+# calls, and work on the memory models for this architecture
+# 4862 MB - normal binaries start at 4608 MB. Non-PIC jumps usually
+# use the BL instruction which requires a destination between -128M
+# to 128M. Since we can't put ourselves below the normal load
+# address, use the very top of the 128M region (minus 2MB)
+KLIBCSHAREDFLAGS = $(LD_IMAGE_BASE_OPT) 0x127E00000
+
+# Kernel has never used stack trampolines
+KLIBCEXECSTACK := n