summary refs log tree commit diff
path: root/sysdeps/loongarch/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/loongarch/Makefile')
-rw-r--r--sysdeps/loongarch/Makefile15
1 files changed, 15 insertions, 0 deletions
diff --git a/sysdeps/loongarch/Makefile b/sysdeps/loongarch/Makefile
new file mode 100644
index 0000000000..41c3449670
--- /dev/null
+++ b/sysdeps/loongarch/Makefile
@@ -0,0 +1,15 @@
+ifeq ($(subdir),misc)
+sysdep_headers += sys/asm.h
+endif
+
+# LoongArch's assembler also needs to know about PIC as it changes the
+# definition of some assembler macros.
+ASFLAGS-.os += $(pic-ccflag)
+
+abi-variants := lp64
+
+ifeq (,$(filter $(default-abi),$(abi-variants)))
+$(error Unknown ABI $(default-abi), must be one of $(abi-variants))
+endif
+
+abi-lp64-condition    := defined __loongarch_lp64