diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 12:24:55 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 12:24:55 +0200 |
commit | 575543347b5baed0ca927cb90ba8807396fe9cc9 (patch) | |
tree | 2ca85e5c092edef5a779562ebf227b6449e21f6f /Kbuild | |
parent | caa27b66bd7188fd063769eaf4b33533ef0709e6 (diff) |
kbuild: save ARCH & CROSS_COMPILE when building a kernel
When building a kernel for a different architecture
kbuild requires the user always to specify ARCH and
CROSS_COMPILE on the command-line.
We use the asm symlink to detect if user forgets to
specify the correct ARCH value - but that symlink
is about to die. And we do now want to loose this check.
This patch save the settings of ARCH and CROSS_COMPILE
in two files named:
include/generated/kernel.arch
include/generated/kernel.cross
The settings are saved during "make *config" time
and always read.
If user try to change the settings we error out.
This works both for plain builds and for O=...
builds.
So now you can do:
$ mkdir sparc64
$ make O=sparc64 ARCH=sparc64 CROSS_COMPILE=sparc64-linux- defconfig
$ cd sparc64
$ make
Notice that you no longer need to tell kbuild
the settings of ARCH and CROSS_COMPILE when you type make
in the output directory.
Likewise for plain builds where you do not use O=...
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Roland McGrath <roland@redhat.com>
Diffstat (limited to 'Kbuild')
0 files changed, 0 insertions, 0 deletions