Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8c9afa0b authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Kbuild arm: LLVMLinux: Add Kbuild support for building arch arm with Clang"

parents bae4211b d5ffb381
Loading
Loading
Loading
Loading
+10 −5
Original line number Diff line number Diff line
@@ -35,6 +35,9 @@ KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm)

# This should work on most of the modern platforms
KBUILD_DEFCONFIG := multi_v7_defconfig
ifeq ($(COMPILER),clang)
KBUILD_CFLAGS += -Wa,-mno-warn-deprecated
endif

# defines filename extension depending memory management type.
ifeq ($(CONFIG_MMU),)
@@ -43,15 +46,17 @@ KBUILD_CFLAGS += $(call cc-option,-mno-unaligned-access)
endif

ifeq ($(CONFIG_FRAME_POINTER),y)
KBUILD_CFLAGS	+=-fno-omit-frame-pointer -mapcs -mno-sched-prolog
KBUILD_CFLAGS	+=-fno-omit-frame-pointer $(call cc-option,-mapcs,) $(call cc-option,-mno-sched-prolog,)
endif

ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
KBUILD_CPPFLAGS	+= -mbig-endian
KBUILD_CPPFLAGS	+= $(call cc-option,-mbig-endian)
CHECKFLAGS	+= -D__ARMEB__
AS		+= -EB
LD		+= -EB
else
KBUILD_CPPFLAGS	+= -mlittle-endian
KBUILD_CPPFLAGS	+= $(call cc-option,-mlittle-endian)
CHECKFLAGS	+= -D__ARMEL__
AS		+= -EL
LD		+= -EL
endif
@@ -108,7 +113,7 @@ tune-$(CONFIG_CPU_V6K) =$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
tune-y := $(tune-y)

ifeq ($(CONFIG_AEABI),y)
CFLAGS_ABI	:=-mabi=aapcs-linux -mfpu=vfp
CFLAGS_ABI	:=-mabi=aapcs-linux $(call cc-option,-mno-thumb-interwork,) -mfpu=vfp
else
CFLAGS_ABI	:=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
endif
@@ -132,7 +137,7 @@ AFLAGS_ISA :=$(CFLAGS_ISA)
endif

# Need -Uarm for gcc < 3.x
KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
KBUILD_CFLAGS	+=$(CFLAGS_ABI) $(CFLAGS_ISA) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float $(call cc-option, -Uarm,)
KBUILD_AFLAGS	+=$(CFLAGS_ABI) $(AFLAGS_ISA) $(arch-y) $(tune-y) -include asm/unified.h -msoft-float

CHECKFLAGS	+= -D__arm__ -m32