]> xenbits.xensource.com Git - unikraft/libs/compiler-rt.git/commitdiff
Add ARM64 support
authorVlad-Andrei BĂDOIU (78692) <vlad_andrei.badoiu@stud.acs.upb.ro>
Tue, 14 Jan 2020 16:08:19 +0000 (16:08 +0000)
committerFelipe Huici <felipe.huici@neclab.eu>
Thu, 16 Jan 2020 10:18:44 +0000 (11:18 +0100)
This patch makes the minimum amount of changes needed to support ARM64.
We now compile the cpu_model.c source file only for x86-64.

Signed-off-by: Vlad-Andrei Badoiu <vlad_andrei.badoiu@stud.acs.upb.ro>
Reviewed-by: Felipe Huici <felipe.huici@neclab.eu>
Config.uk
Makefile.uk

index 7b0cfc70d04469cfe88337e60d7ce52dab891fba..bf576fa7c6d8a47025f8cc8f14b5cd2b04029219 100644 (file)
--- a/Config.uk
+++ b/Config.uk
@@ -1,5 +1,6 @@
 menuconfig LIBCOMPILER_RT
     bool " compiler-rt - runtime support"
+    select UKSYSINFO
     default n
 
 if LIBCOMPILER_RT
index 558a03ec2c5e5fae4cc0d91e3d357c055b59c87e..b929f6a360a1414b7cc4cb309f957e3a2560912d 100644 (file)
@@ -69,9 +69,6 @@ CXXINCLUDES-$(CONFIG_LIBCOMPILER_RT) += -I$(LIBCOMPILER_RT_SRC)/include
 ################################################################################
 # Global flags
 ################################################################################
-CONFIG_FLAGS   += -D__x86_64__
-LIBCOMPILER_RT_CFLAGS-y    +=  $(CONFIG_FLAGS)
-LIBCOMPILER_RT_CXXFLAGS-y    +=  $(CONFIG_FLAGS)
 
 LIBCOMPILER_RT_SUPPRESS_FLAGS += -Wno-unused-parameter
 LIBCOMPILER_RT_CFLAGS-y   += $(LIBCOMPILER_RT_SUPPRESS_FLAGS)
@@ -101,7 +98,7 @@ LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/fixunsdfdi.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/udivmodti4.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/floattisf.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/mulodi4.c
-LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/cpu_model.c
+LIBCOMPILER_RT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBCOMPILER_RT_SRC)/lib/builtins/cpu_model.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/fixunsxfsi.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/fixunstfdi.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/extendsftf2.c
@@ -235,6 +232,9 @@ LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/fixsfdi.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/fixdfti.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/floatdidf.c
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/extendsfdf2.c
+LIBCOMPILER_RT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBCOMPILER_RT_SRC)/lib/builtins/x86_64/chkstk2.S
+LIBCOMPILER_RT_SRCS-$(CONFIG_ARCH_X86_64) += $(LIBCOMPILER_RT_SRC)/lib/builtins/x86_64/chkstk.S
+
 ifdef CONFIG_LIBCOMPILER_RT_ATOMIC
 LIBCOMPILER_RT_SRCS-y += $(LIBCOMPILER_RT_SRC)/lib/builtins/atomic.c
 endif