Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: only build platform or variant if they contain a Makefile

We only add the platform or variant directory to core-y if it
contains a Makefile. Consequently, we can remove the Makefiles
for the dc232b and fsf processor variants.

Signed-off-by: Chris Zankel <chris@zankel.net>

+8 -10
+8 -8
arch/xtensa/Makefile
··· 64 64 endif 65 65 endif 66 66 67 - # 67 + # Only build variant and/or platform if it includes a Makefile 68 + 69 + buildvar := $(shell test -a $(srctree)/arch/xtensa/variants/$(VARIANT)/Makefile && echo arch/xtensa/variants/$(VARIANT)/) 70 + buildplf := $(shell test -a $(srctree)/arch/xtensa/platforms/$(PLATFORM)/Makefile && echo arch/xtensa/platforms/$(PLATFORM)/) 71 + 72 + # Find libgcc.a 68 73 69 74 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 70 75 71 76 head-y := arch/xtensa/kernel/head.o 72 77 core-y += arch/xtensa/kernel/ arch/xtensa/mm/ 73 - ifneq ($(VARIANT),) 74 - core-y += arch/xtensa/variants/$(VARIANT)/ 75 - endif 76 - ifneq ($(PLATFORM),) 77 - core-y += arch/xtensa/platforms/$(PLATFORM)/ 78 - endif 78 + core-y += $(buildvar) $(buildplf) 79 + 79 80 libs-y += arch/xtensa/lib/ $(LIBGCC) 80 81 81 82 boot := arch/xtensa/boot 82 - 83 83 84 84 all: zImage 85 85
-1
arch/xtensa/variants/dc232b/Makefile
··· 1 - # dc232b Makefile
-1
arch/xtensa/variants/fsf/Makefile
··· 1 - # fsf Makefile