diff options
Diffstat (limited to 'arch/arm/Makefile')
-rw-r--r-- | arch/arm/Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 75935d26040c..bea5bf5e7384 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -23,6 +23,14 @@ OBJCOPYFLAGS :=-O binary -R .comment -S GZFLAGS :=-9 #KBUILD_CFLAGS +=-pipe +ifeq ($(COMPILER),clang) +# Clang options +ifneq ($(CROSS_COMPILE),) +KBUILD_CPPFLAGS += -target $(CROSS_COMPILE:-=) +endif +KBUILD_CFLAGS += -fno-builtin -Wno-asm-operand-widths -Xassembler -mno-warn-deprecated +endif + # Never generate .eh_frame KBUILD_CFLAGS += $(call cc-option,-fno-dwarf2-cfi-asm) @@ -41,11 +49,11 @@ KBUILD_CFLAGS +=-fno-omit-frame-pointer -mapcs -mno-sched-prolog endif ifeq ($(CONFIG_CPU_BIG_ENDIAN),y) -KBUILD_CPPFLAGS += -mbig-endian +KBUILD_CPPFLAGS += $(call cc-option,-mbig-endian,) AS += -EB LD += -EB else -KBUILD_CPPFLAGS += -mlittle-endian +KBUILD_CPPFLAGS += $(call cc-option,-mlittle-endian,) AS += -EL LD += -EL endif @@ -96,7 +104,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 -mno-thumb-interwork -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 @@ -120,7 +128,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__ |