The symbolic link to SoC/CPU specific header directory is created
during the build, while it is only necessary for ARM, AVR32, SPARC,
x86, and some CPUs of PowerPC. For the other architectures, it just
results in a broken symbolic link.
Introduce CONFIG_CREATE_ARCH_SYMLINK to not create unneeded symbolic
links.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
+config CREATE_ARCH_SYMLINK
+ bool
+
config HAVE_GENERIC_BOARD
bool
config ARM
bool "ARM architecture"
+ select CREATE_ARCH_SYMLINK
select HAVE_PRIVATE_LIBGCC if !ARM64
select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL
config AVR32
bool "AVR32 architecture"
+ select CREATE_ARCH_SYMLINK
select HAVE_GENERIC_BOARD
select SYS_GENERIC_BOARD
config SPARC
bool "SPARC architecture"
+ select CREATE_ARCH_SYMLINK
config X86
bool "x86 architecture"
+ select CREATE_ARCH_SYMLINK
select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD
select SYS_GENERIC_BOARD
config MPC83xx
bool "MPC83xx"
+ select CREATE_ARCH_SYMLINK
config MPC85xx
bool "MPC85xx"
+ select CREATE_ARCH_SYMLINK
config MPC86xx
bool "MPC86xx"
config 4xx
bool "PPC4xx"
+ select CREATE_ARCH_SYMLINK
endchoice
# Otherwise, create a symbolic link to arch/$(ARCH)/include/asm/arch-$(SOC).
PHONY += create_symlink
create_symlink:
+ifdef CONFIG_CREATE_ARCH_SYMLINK
ifneq ($(KBUILD_SRC),)
$(Q)mkdir -p include/asm
$(Q)if [ -d $(KBUILD_SRC)/arch/$(ARCH)/mach-$(SOC)/include/mach ]; then \
fi; \
ln -fsn $$dest arch/$(ARCH)/include/asm/arch
endif
+endif
PHONY += FORCE
FORCE: