Skip to content
Snippets Groups Projects
Commit a350c6a6 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Tom Rini
Browse files

kbuild: create symbolic link only for ARM, AVR32, SPARC, PowerPC, x86


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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 7e3f94e1
No related branches found
No related tags found
No related merge requests found
config CREATE_ARCH_SYMLINK
bool
config HAVE_GENERIC_BOARD config HAVE_GENERIC_BOARD
bool bool
...@@ -18,12 +21,14 @@ config ARC ...@@ -18,12 +21,14 @@ config ARC
config ARM config ARM
bool "ARM architecture" bool "ARM architecture"
select CREATE_ARCH_SYMLINK
select HAVE_PRIVATE_LIBGCC if !ARM64 select HAVE_PRIVATE_LIBGCC if !ARM64
select HAVE_GENERIC_BOARD select HAVE_GENERIC_BOARD
select SUPPORT_OF_CONTROL select SUPPORT_OF_CONTROL
config AVR32 config AVR32
bool "AVR32 architecture" bool "AVR32 architecture"
select CREATE_ARCH_SYMLINK
select HAVE_GENERIC_BOARD select HAVE_GENERIC_BOARD
select SYS_GENERIC_BOARD select SYS_GENERIC_BOARD
...@@ -84,9 +89,11 @@ config SH ...@@ -84,9 +89,11 @@ config SH
config SPARC config SPARC
bool "SPARC architecture" bool "SPARC architecture"
select CREATE_ARCH_SYMLINK
config X86 config X86
bool "x86 architecture" bool "x86 architecture"
select CREATE_ARCH_SYMLINK
select HAVE_PRIVATE_LIBGCC select HAVE_PRIVATE_LIBGCC
select HAVE_GENERIC_BOARD select HAVE_GENERIC_BOARD
select SYS_GENERIC_BOARD select SYS_GENERIC_BOARD
......
...@@ -22,9 +22,11 @@ config MPC8260 ...@@ -22,9 +22,11 @@ config MPC8260
config MPC83xx config MPC83xx
bool "MPC83xx" bool "MPC83xx"
select CREATE_ARCH_SYMLINK
config MPC85xx config MPC85xx
bool "MPC85xx" bool "MPC85xx"
select CREATE_ARCH_SYMLINK
config MPC86xx config MPC86xx
bool "MPC86xx" bool "MPC86xx"
...@@ -34,6 +36,7 @@ config 8xx ...@@ -34,6 +36,7 @@ config 8xx
config 4xx config 4xx
bool "PPC4xx" bool "PPC4xx"
select CREATE_ARCH_SYMLINK
endchoice endchoice
......
...@@ -107,6 +107,7 @@ include/config.h: scripts/Makefile.autoconf create_symlink FORCE ...@@ -107,6 +107,7 @@ include/config.h: scripts/Makefile.autoconf create_symlink FORCE
# Otherwise, create a symbolic link to arch/$(ARCH)/include/asm/arch-$(SOC). # Otherwise, create a symbolic link to arch/$(ARCH)/include/asm/arch-$(SOC).
PHONY += create_symlink PHONY += create_symlink
create_symlink: create_symlink:
ifdef CONFIG_CREATE_ARCH_SYMLINK
ifneq ($(KBUILD_SRC),) ifneq ($(KBUILD_SRC),)
$(Q)mkdir -p include/asm $(Q)mkdir -p include/asm
$(Q)if [ -d $(KBUILD_SRC)/arch/$(ARCH)/mach-$(SOC)/include/mach ]; then \ $(Q)if [ -d $(KBUILD_SRC)/arch/$(ARCH)/mach-$(SOC)/include/mach ]; then \
...@@ -123,6 +124,7 @@ else ...@@ -123,6 +124,7 @@ else
fi; \ fi; \
ln -fsn $$dest arch/$(ARCH)/include/asm/arch ln -fsn $$dest arch/$(ARCH)/include/asm/arch
endif endif
endif
PHONY += FORCE PHONY += FORCE
FORCE: FORCE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment