From patchwork Mon Oct 7 06:50:00 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 280933 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id DF9692C009A for ; Mon, 7 Oct 2013 17:50:40 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9A9174A092; Mon, 7 Oct 2013 08:50:34 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id inJzDLEFPuW3; Mon, 7 Oct 2013 08:50:34 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C48354A080; Mon, 7 Oct 2013 08:50:29 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7BBCC4A07B for ; Mon, 7 Oct 2013 08:50:23 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7tD5eSo1v2a7 for ; Mon, 7 Oct 2013 08:50:14 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.mei.co.jp (smtp.mei.co.jp [133.183.100.20]) by theia.denx.de (Postfix) with ESMTP id 56F214A018 for ; Mon, 7 Oct 2013 08:50:06 +0200 (CEST) Received: from mail-gw.jp.panasonic.com ([157.8.1.157]) by smtp.mei.co.jp (8.12.11.20060614/3.7W/kc-maile11) with ESMTP id r976o2mX007114 for ; Mon, 7 Oct 2013 15:50:02 +0900 (JST) Received: from epochmail.jp.panasonic.com ([157.8.1.130]) by mail.jp.panasonic.com (8.11.6p2/3.7W/kc-maili17) with ESMTP id r976o2313513 for ; Mon, 7 Oct 2013 15:50:02 +0900 Received: by epochmail.jp.panasonic.com (8.12.11.20060308/3.7W/lomi13) id r976o2L8002309; Mon, 7 Oct 2013 15:50:02 +0900 Received: from poodle by lomi13.jp.panasonic.com (8.12.11.20060308/3.7W) with ESMTP id r976o2A4002275; Mon, 7 Oct 2013 15:50:02 +0900 Received: from beagle.diag.org (beagle.diag.org [10.184.179.16]) by poodle (Postfix) with ESMTP id 376C52743A5C; Mon, 7 Oct 2013 15:50:02 +0900 (JST) From: Masahiro Yamada To: u-boot@lists.denx.de Date: Mon, 7 Oct 2013 15:50:00 +0900 Message-Id: <1381128600-8120-1-git-send-email-yamada.m@jp.panasonic.com> X-Mailer: git-send-email 1.8.1.2 Subject: [U-Boot] [PATCH] Makefile: do not create a symbolic link to arch/${ARCH}/include/asm X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de In-tree build: - Do not create a symbolic link from include/asm to arch/${ARCH}/include/asm - Instead, add ${SRCTREE}/arch/arm/include into the header search path Out-of-tree build: - Do not create a directory ${OBJTREE}/include2 - Do not create a symbolic link from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm - Instead, add ${SRCTREE}/arch/arm/include into the header search path Signed-off-by: Masahiro Yamada --- Note: The symbolic links "asm/arch" and "asm/proc" (ARM only) are created the same as before. I personally do not like these ugly symbolic links and directory structure, but fixing this gives a so big impact that I did not touch this in this commit. config.mk | 4 ++-- mkconfig | 14 ++++++-------- tools/Makefile | 2 +- tools/env/Makefile | 2 +- tools/imls/Makefile | 2 +- 5 files changed, 11 insertions(+), 13 deletions(-) diff --git a/config.mk b/config.mk index 48913f6..702eb02 100644 --- a/config.mk +++ b/config.mk @@ -257,10 +257,10 @@ endif endif ifneq ($(OBJTREE),$(SRCTREE)) -CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include +CPPFLAGS += -I$(OBJTREE)/include endif -CPPFLAGS += -I$(TOPDIR)/include +CPPFLAGS += -I$(TOPDIR)/include -I$(SRCTREE)/arch/$(ARCH)/include CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \ -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) diff --git a/mkconfig b/mkconfig index 1d06c8e..40db991 100755 --- a/mkconfig +++ b/mkconfig @@ -96,17 +96,11 @@ fi # if [ "$SRCTREE" != "$OBJTREE" ] ; then mkdir -p ${OBJTREE}/include - mkdir -p ${OBJTREE}/include2 - cd ${OBJTREE}/include2 - rm -f asm - ln -s ${SRCTREE}/arch/${arch}/include/asm asm LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/ - cd ../include + cd ${OBJTREE}/include mkdir -p asm else - cd ./include - rm -f asm - ln -s ../arch/${arch}/include/asm asm + cd arch/${arch}/include fi rm -f asm/arch @@ -122,6 +116,10 @@ if [ "${arch}" = "arm" ] ; then ln -s ${LNPREFIX}proc-armv asm/proc fi +if [ "$SRCTREE" = "$OBJTREE" ] ; then + cd ${SRCTREE}/include +fi + # # Create include file for Make # diff --git a/tools/Makefile b/tools/Makefile index c36cde2..f5bebe3 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -160,7 +160,7 @@ NOPEDOBJS := $(addprefix $(obj),$(NOPED_OBJ_FILES-y)) # HOSTCPPFLAGS = -include $(SRCTREE)/include/libfdt_env.h \ -idirafter $(SRCTREE)/include \ - -idirafter $(OBJTREE)/include2 \ + -idirafter $(SRCTREE)/arch/$(ARCH)/include \ -idirafter $(OBJTREE)/include \ -I $(SRCTREE)/lib/libfdt \ -I $(SRCTREE)/tools \ diff --git a/tools/env/Makefile b/tools/env/Makefile index 14d131b..27892f7 100644 --- a/tools/env/Makefile +++ b/tools/env/Makefile @@ -14,7 +14,7 @@ HEADERS := fw_env.h $(OBJTREE)/include/config.h # Compile for a hosted environment on the target HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ - -idirafter $(OBJTREE)/include2 \ + -idirafter $(SRCTREE)/arch/$(ARCH)/include \ -idirafter $(OBJTREE)/include \ -idirafter $(SRCTREE)/tools/env \ -DUSE_HOSTCC \ diff --git a/tools/imls/Makefile b/tools/imls/Makefile index 1be1edb..502613c 100644 --- a/tools/imls/Makefile +++ b/tools/imls/Makefile @@ -37,7 +37,7 @@ LIBFDT_OBJS := $(addprefix $(obj),$(LIBFDT_OBJ_FILES-y)) # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps # HOSTCPPFLAGS = -idirafter $(SRCTREE)/include \ - -idirafter $(OBJTREE)/include2 \ + -idirafter $(SRCTREE)/arch/$(ARCH)/include \ -idirafter $(OBJTREE)/include \ -I $(SRCTREE)/lib/libfdt \ -I $(SRCTREE)/tools \