diff mbox

[U-Boot,v3,2/2] kbuild: create symbolic link only for ARM, AVR32, SPARC, PowerPC, x86

Message ID 1436961569-1779-3-git-send-email-yamada.masahiro@socionext.com
State Superseded
Delegated to: Tom Rini
Headers show

Commit Message

Masahiro Yamada July 15, 2015, 11:59 a.m. UTC
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>
---

Changes in v3:
  - Fix AVR32 build error
  - Rebase on u-boot/master (commit 4905dfc)

Changes in v2:
  - Use 'ifdef CONFIG_CREATE_ARCH_SYMLINK' for readability

 arch/Kconfig              | 7 +++++++
 arch/powerpc/Kconfig      | 3 +++
 scripts/Makefile.autoconf | 2 ++
 3 files changed, 12 insertions(+)

Comments

Simon Glass July 18, 2015, 2:37 p.m. UTC | #1
On 15 July 2015 at 05:59, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> 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>
> ---
>
> Changes in v3:
>   - Fix AVR32 build error
>   - Rebase on u-boot/master (commit 4905dfc)
>
> Changes in v2:
>   - Use 'ifdef CONFIG_CREATE_ARCH_SYMLINK' for readability
>
>  arch/Kconfig              | 7 +++++++
>  arch/powerpc/Kconfig      | 3 +++
>  scripts/Makefile.autoconf | 2 ++
>  3 files changed, 12 insertions(+)

Reviewed-by: Simon Glass <sjg@chromium.org>
Tom Rini July 28, 2015, 2:58 p.m. UTC | #2
On Wed, Jul 15, 2015 at 08:59:29PM +0900, Masahiro Yamada wrote:

> 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>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/arch/Kconfig b/arch/Kconfig
index afa1d6c..e952bb1 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -1,3 +1,6 @@ 
+config CREATE_ARCH_SYMLINK
+	bool
+
 config HAVE_GENERIC_BOARD
 	bool
 
@@ -18,12 +21,14 @@  config ARC
 
 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
 
@@ -84,9 +89,11 @@  config SH
 
 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
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 3b3f446..18451d3 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -22,9 +22,11 @@  config MPC8260
 
 config MPC83xx
 	bool "MPC83xx"
+	select CREATE_ARCH_SYMLINK
 
 config MPC85xx
 	bool "MPC85xx"
+	select CREATE_ARCH_SYMLINK
 
 config MPC86xx
 	bool "MPC86xx"
@@ -34,6 +36,7 @@  config 8xx
 
 config 4xx
 	bool "PPC4xx"
+	select CREATE_ARCH_SYMLINK
 
 endchoice
 
diff --git a/scripts/Makefile.autoconf b/scripts/Makefile.autoconf
index 36bfa17..d668982 100644
--- a/scripts/Makefile.autoconf
+++ b/scripts/Makefile.autoconf
@@ -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).
 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	\
@@ -123,6 +124,7 @@  else
 	fi;								\
 	ln -fsn $$dest arch/$(ARCH)/include/asm/arch
 endif
+endif
 
 PHONY += FORCE
 FORCE: