Skip to content

Commit

Permalink
powerpc: Only use -mabi=altivec if toolchain supports it
Browse files Browse the repository at this point in the history
The -mabi=altivec option is not recognised on LLVM, so use call cc-option
to check for support.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Anton Blanchard authored and Michael Ellerman committed Jun 11, 2015
1 parent b91c1e3 commit 1fb3f5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion arch/powerpc/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ obj-$(CONFIG_PPC_LIB_RHEAP) += rheap.o
obj-$(CONFIG_FTR_FIXUP_SELFTEST) += feature-fixups-test.o

obj-$(CONFIG_ALTIVEC) += xor_vmx.o
CFLAGS_xor_vmx.o += -maltivec -mabi=altivec
CFLAGS_xor_vmx.o += -maltivec $(call cc-option,-mabi=altivec)

obj-$(CONFIG_PPC64) += $(obj64-y)
2 changes: 1 addition & 1 deletion lib/raid6/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ quiet_cmd_unroll = UNROLL $@
< $< > $@ || ( rm -f $@ && exit 1 )

ifeq ($(CONFIG_ALTIVEC),y)
altivec_flags := -maltivec -mabi=altivec
altivec_flags := -maltivec $(call cc-option,-mabi=altivec)
endif

# The GCC option -ffreestanding is required in order to compile code containing
Expand Down

0 comments on commit 1fb3f5a

Please sign in to comment.