public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Pavel Pisa <pisa@cmp.felk.cvut.cz>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	kai@germaschewski.name
Subject: Re: [PATCH] preserve ARCH and CROSS_COMPILE in the build directory generated Makefile
Date: Fri, 29 Apr 2005 22:42:12 +0100	[thread overview]
Message-ID: <20050429224212.G30010@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050429210053.GC8699@mars.ravnborg.org>; from sam@ravnborg.org on Fri, Apr 29, 2005 at 11:00:53PM +0200

On Fri, Apr 29, 2005 at 11:00:53PM +0200, Sam Ravnborg wrote:
> On Fri, Apr 29, 2005 at 01:35:33PM +0200, Pavel Pisa wrote:
> > This patch ensures, that architecture and target cross-tools prefix
> > is preserved in the Makefile generated in the build directory for
> > out of source tree kernel compilation. This prevents accidental
> > screwing of configuration and builds for the case, that make without
> > full architecture specific options is invoked in the build
> > directory. It is secure use accustomed "make", "make xconfig",
> > etc. without fear and special care now.
> 
> Hi Pavel.
> I will not apply this path because it introduce a difference when
> building usign a separate output direcory compared to an in-tree build.
> 
> I have briefly looked into a solution where I could add this information
> in .config but was sidetracked by other stuff so I newer got it working.
> 
> The build system for the kernel needs to be as predictable as possible
> and introducing functionality that is only valid when using a separate
> output directory does not help here.

Without it, folk will then do (and this is taken from someone elses
example):

  cd /usr/src
  tar -xjf /path/to/linux-2.6.x.tar.bz
  cd linux-2.6.x
  mkdir -p _build/arm
  cd _build/arm
  cat >GNUmakefile <<EOF
VERSION = 2
PATCHLEVEL = 6
                                                                                
KERNELSRC    := /usr/src/linux-2.6.x
KERNELOUTPUT := /usr/src/linux-2.6.x/_build/arm
                                                                                
MAKEFLAGS += --no-print-directory
                                                                                
ARCH            = arm
#CROSS_COMPILE  = arm-unknown-linux-gnu-
CROSS_COMPILE   = arm-linux-
                                                                                
all:
        $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELSRC) O=$(KERNELOUTPUT)
                                                                                
%::
        $(MAKE) ARCH=$(ARCH) CROSS_COMPILE=$(CROSS_COMPILE) -C $(KERNELSRC) O=$(KERNELOUTPUT) $@
EOF
  make xconfig
  make

which I think you'll agree is far worse.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  reply	other threads:[~2005-04-29 21:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29 11:35 [PATCH] preserve ARCH and CROSS_COMPILE in the build directory generated Makefile Pavel Pisa
2005-04-29 21:00 ` Sam Ravnborg
2005-04-29 21:42   ` Russell King [this message]
2005-04-29 22:32     ` Pavel Pisa
2005-04-29 22:26   ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050429224212.G30010@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=kai@germaschewski.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pisa@cmp.felk.cvut.cz \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox