dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

532 Commits

Author SHA1 Message Date
Amerigo Wang 01ab17887f Makefile: "make kernelrelease" should show the correct full kernel version
After commit 85a256d8e0, 'make kernelrelease'
doesn't show the correct full kernel version. This patch fixes it,
'make kernelrelease' will show the same version name with the one
you finally get.

Cc: David Rientjes <rientjes@google.com>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Amerigo Wang <amwang@redhat.com>
[mmarek: merged with 0915512 and added dependency on
include/config/kernel.release]
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-29 14:05:35 +02:00
Michal Marek 09155120cf kbuild: Clean up and speed up the localversion logic
Now that we run scripts/setlocalversion during every build, it makes
sense to move all the localversion logic there. This cleans up the
toplevel Makefile and also makes sure that the script is called only
once in 'make prepare' (previously, it would be called every time due to
a variable expansion in an ifneq statement). No user-visible change is
intended, unless one runs the setlocalversion script directly.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Greg Thelen <gthelen@google.com>
Cc: Nico Schottelius <nico-linuxsetlocalversion@schottelius.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-06-18 14:23:21 +02:00
Greg Thelen fb994ecc2b kbuild: Fix checking of scm-identifier variable
I'm looking Makefile in the -mm branch (dated 2010-04-28-16-53) and
seeing what looks like a bug in the checking of scm-identifier.  The
"ifneq ($scm-identifier)" seems to always execute "ifeq
($(LOCALVERSION,)) ...".  This patch fixes the checking of
scm-identifier.

Signed-off-by: Greg Thelen <gthelen@google.com>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-05-06 16:32:20 +02:00
Michal Marek 73d1393eb8 kbuild: Generate modules.builtin in make modules_install
The previous approach didn't work if one did
make modules && make modules_install
Add modules.builtin as dependency of _modinst_, which is the target that
actually needs the file.

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-10 12:31:06 +01:00
Michal Marek a6c366324c kbuild: Do not unnecessarily regenerate modules.builtin
Only regenerate it if the configuration has changed. Also, do this after
the modules build to fix errors with some weird Makefiles that are
generated during build.

Reported-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-03-08 11:23:14 +01:00
Andi Kleen d0679c7303 kbuild: move -fno-dwarf2-cfi-asm to powerpc only
Better dwarf2 unwind information is a good thing, it allows better
debugging with kgdb and crash and helps systemtap.

Commit 003086497f ("Build with
-fno-dwarf2-cfi-asm") disabled some CFI information globally to work
around a module loader bug on powerpc.

But this disables the better unwind tables for all architectures, not just
powerpc.  Move the workaround to powerpc and also add a suitable comment
that's it really a workaround.

This improves dwarf2 unwind tables on x86 at least.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-05 23:21:18 +01:00
Joe Perches 6271897978 Makefile: Document ability to make file.lst and file.S
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-02 14:33:55 +01:00
David Rientjes 85a256d8e0 kbuild: improve version string logic
The LOCALVERSION= string passed to "make" will now always be appended to
the kernel version after CONFIG_LOCALVERSION, if it exists, regardless of
whether CONFIG_LOCALVERSION_AUTO is set or not.  This allows users to
uniquely identify their kernel builds with a string.

If CONFIG_LOCALVERSION_AUTO is enabled, the unique SCM tag reported by
setlocalversion (or .scmversion) is appended to the kernel version, if it
exists.  When CONFIG_LOCALVERSION_AUTO is not enabled, a `+' is appended
to the kernel version to represent that the kernel has been revised since
the last release unless "make LOCALVERSION=" was used to uniquely identify
the build.

The end result is this:

 - when LOCALVERSION= is passed to "make", it is appended to the kernel
   version,

 - when CONFIG_LOCALVERSION_AUTO is enabled, a unique SCM identifier is
   appended if the respository has been revised beyond a tagged commit,
   and

 - when CONFIG_LOCALVERSION_AUTO is disabled, a `+' is appended if the
   repository has been revised beyond a tagged commit and LOCALVERSION=
   was not passed to "make".

Examples:

With CONFIG_LOCALVERSION_AUTO: "make" results in
v2.6.32-rc4-00149-ga3ccf63.  If there are uncommited changes to the
respository, it results in v2.6.32-rc4-00149-ga3ccf63-dirty.  If
"make LOCALVERSION=kbuild" were used, it results in
v2.6.32-rc4-kbuild-00149-ga3ccf63-dirty.

Without CONFIG_LOCALVERSION_AUTO, "make" results in v2.6.32-rc4+
unless the repository is at the Linux v2.6.32-rc4 commit (in which
case the version would be v2.6.32-rc4).  If "make LOCALVERSION=kbuild"
were used, it results in v2.6.32-rc4-kbuild.

Also renames variables such as localver-auto and _localver-auto to more
accurately describe what they represent: localver-extra and
scm-identifier, respectively.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-02 14:33:55 +01:00
Roland McGrath 8433646601 kconfig CROSS_COMPILE option
This adds CROSS_COMPILE as a kconfig string so you can store it in
.config.  Then you can use plain "make" in the configured kernel build
directory to do the right cross compilation without setting the
command-line or environment variable every time.

With this, you can set up different build directories for different kernel
configurations, whether native or cross-builds, and then use the simple:

	make -C /build/dir M=module-source-dir

idiom to build modules for any given target kernel, indicating which one
by nothing but the build directory chosen.

I tried a version that defaults the string with env="CROSS_COMPILE" so
that in a "make oldconfig" with CROSS_COMPILE in the environment you can
just hit return to store the way you're building it.  But the kconfig
prompt for strings doesn't give you any way to say you want an empty
string instead of the default, so I punted that.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: Anibal Monsalve Salazar <anibal@debian.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Michal Marek <mmarek@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-02-02 14:33:54 +01:00
Linus Torvalds abe94c756c Linux 2.6.33-rc6 2010-01-29 13:57:50 -08:00
Linus Torvalds 92dcffb916 Linux 2.6.33-rc5 2010-01-21 15:31:35 -08:00
Michal Marek 07105202bd Makefile: do not override LC_CTYPE
Setting LC_CTYPE=C breaks localized messages in some setups. With only
LC_COLLATE=C and LC_NUMERIC=C, we get almost all we need, except for not
so defined character classes and tolower()/toupper(). The former is not
a big issue, because we can assume that e.g. [:alpha:] will always
include a-zA-Z and we only ever process ASCII input. The latter seems
only affect arch/sh/tools/gen-mach-types, which we can handle separately.

So after this patch the meaning of ranges like [a-z], the behavior of
sort and join, etc. should be the same everywhere and at the same time
gcc should be able to print localized waring and error messages.
LC_NUMERIC=C might not be necessary, but setting it doesn't hurt.

Reported-by: Simon Horman <horms@verge.net.au>
Reported-by: Sergei Trofimovich <slyfox@inbox.ru>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Tested-by: Simon Horman <horms@verge.net.au>
Tested-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2010-01-13 13:27:24 +01:00
Linus Torvalds 7284ce6c9f Linux 2.6.33-rc4 2010-01-12 21:15:00 -08:00
Linus Torvalds 74d2e4f8d7 Linux 2.6.33-rc3 2010-01-05 16:02:46 -08:00
Linus Torvalds 6b7b284958 Linux 2.6.33-rc2 2009-12-24 13:09:41 -08:00
Linus Torvalds 3981e15286 Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  x86, irq: Allow 0xff for /proc/irq/[n]/smp_affinity on an 8-cpu system
  Makefile: Unexport LC_ALL instead of clearing it
  x86: Fix objdump version check in arch/x86/tools/chkobjdump.awk
  x86: Reenable TSC sync check at boot, even with NONSTOP_TSC
  x86: Don't use POSIX character classes in gen-insn-attr-x86.awk
  Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
  x86: Increase MAX_EARLY_RES; insufficient on 32-bit NUMA
  x86: Fix checking of SRAT when node 0 ram is not from 0
  x86, cpuid: Add "volatile" to asm in native_cpuid()
  x86, msr: msrs_alloc/free for CONFIG_SMP=n
  x86, amd: Get multi-node CPU info from NodeId MSR instead of PCI config space
  x86: Add IA32_TSC_AUX MSR and use it
  x86, msr/cpuid: Register enough minors for the MSR and CPUID drivers
  initramfs: add missing decompressor error check
  bzip2: Add missing checks for malloc returning NULL
  bzip2/lzma/gzip: pre-boot malloc doesn't return NULL on failure
2009-12-19 09:48:14 -08:00
Linus Torvalds 55639353a0 Linux 2.6.33-rc1 2009-12-17 17:14:40 -08:00
H. Peter Anvin 06b5dc646b Makefile: Unexport LC_ALL instead of clearing it
Apparently not all versions of glibc and utilities treat an empty
LC_ALL as nonexistent, causing error messages to be garbled.  Instead,
explicitly unexport it from the environment.

Reported-and-tested-by: Masami Hiramatsu <mhiramat@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <4B2AC394.4030108@redhat.com>
Cc: Michal Marek <mmarek@sues.cz>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
2009-12-17 15:51:37 -08:00
H. Peter Anvin c051346b7d Makefile: set LC_CTYPE, LC_COLLATE, LC_NUMERIC to C
There are a number of common Unix constructs like character ranges in
grep/sed/awk which don't work as expected with LC_COLLATE set to other
than C.  Similarly, set LC_CTYPE and LC_NUMERIC to C to avoid other
nasty surprises.

In order to make sure these actually take effect we also have to
clear LC_ALL.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: Michal Marek <mmarek@sues.cz>
Acked-by: Masami Hiramatsu <mhiramat@redhat.com>
Acked-by: Roland Dreier <rdreier@cisco.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
LKML-Reference: <4B2A1761.4070904@suse.cz>
2009-12-17 07:03:21 -08:00
Michal Marek d9bdcc72ec kbuild: fix make clean after mismerge
Fix typo / thinko in commit bc081dd.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 15:28:03 +01:00
Michal Marek bc081dd6e9 kbuild: generate modules.builtin
To make it easier for module-init-tools and scripts like mkinitrd to
distinguish builtin and missing modules, install a modules.builtin file
listing all builtin modules. This is done by generating an additional
config file (tristate.conf) with tristate options set to uppercase 'Y'
or 'M'. If we source that config file, the builtin modules appear in
obj-Y.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:16 +01:00
Michal Marek 32197c7ffb kbuild: create include/generated in silentoldconfig
The toplevel Makefile creates the directory if it runs silentoldconfig
automatically, but if run manually, it fails:

  $ make mrproper
  $ make defconfig && make silentoldconfig
  *** Default configuration is based on 'x86_64_defconfig'
  #
  # configuration written to .config
  #
  scripts/kconfig/conf -s arch/x86/Kconfig

  *** Error during update of the kernel configuration.
  ...

Move the mkdir command to the silentoldconfig target to make it work.

Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:16 +01:00
Wenji Huang 8723eaeff5 Kbuild: clean up marker
Drop Module.markers from cleaning list since marker
is removed.

Signed-off-by: Wenji Huang <wenji.huang@oracle.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:15 +01:00
Sam Ravnborg 273b281fa2 kbuild: move utsrelease.h to include/generated
Fix up all users of utsrelease.h

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:15 +01:00
Sam Ravnborg 264a268380 kbuild: move autoconf.h to include/generated
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:15 +01:00
Sam Ravnborg f7f16b7799 kbuild: drop include/asm
We no longer use this directory for generated files and
all architectures has moved their header files so no
symlink tricks are needed either.

Drop the symlink and drop the ARCH check.

If we really need to check that the SRCARCH has not changed
when we build a kernel we can add this check back - but then we will
find a more convenient way to store the info.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Sam Ravnborg c95fa08a3e kbuild: do not check for include/asm-$ARCH
No architectures uses include/asm-$ARCH now.
So drop check for location of include files

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Sam Ravnborg 96f13045b6 kbuild: drop include2/ used for O=... builds
There is no longer any use of the include2/ directory.
The generated files has moved to include/generated.

Drop all references to said directory.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Sam Ravnborg 559df2e021 kbuild: move asm-offsets.h to include/generated
The simplest method was to add an extra asm-offsets.h
file in arch/$ARCH/include/asm that references the generated file.

We can now migrate the architectures one-by-one to reference
the generated file direct - and when done we can delete the
temporary arch/$ARCH/include/asm/asm-offsets.h file.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Sam Ravnborg 01fc0ac198 kbuild: move bounds.h to include/generated
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:14 +01:00
Sam Ravnborg 24a675e8b8 kbuild: search arch/$ARCH/include before include/
The namespace used in arch/$ARCH/include is different from
what is used in include/ except for the include/asm directory.

This patch gives the arch/$ARCH/include/asm directory priority
over include/asm.

When we add asm-offsets.h to arch/$ARCH/include/asm/ this
patch makes sure we pick up the arch specific version
and not the one we have in include/asm.

The situation with an asm-offsets.h file located in
both include/asm _and_ arch/$ARCH/include/asm will happen
when we move more files over to include/generated.

This happens because in some cases it is not practical
to rename all users so we simply add a file
in arch/$ARCH/include/asm that includes the generated version.

This is the solution we use for asm-offsets.h as an example.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Michal Marek <mmarek@suse.cz>
2009-12-12 13:08:13 +01:00
Linus Torvalds 96fa2b508d Merge branch 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'tracing-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (40 commits)
  tracing: Separate raw syscall from syscall tracer
  ring-buffer-benchmark: Add parameters to set produce/consumer priorities
  tracing, function tracer: Clean up strstrip() usage
  ring-buffer benchmark: Run producer/consumer threads at nice +19
  tracing: Remove the stale include/trace/power.h
  tracing: Only print objcopy version warning once from recordmcount
  tracing: Prevent build warning: 'ftrace_graph_buf' defined but not used
  ring-buffer: Move access to commit_page up into function used
  tracing: do not disable interrupts for trace_clock_local
  ring-buffer: Add multiple iterations between benchmark timestamps
  kprobes: Sanitize struct kretprobe_instance allocations
  tracing: Fix to use __always_unused attribute
  compiler: Introduce __always_unused
  tracing: Exit with error if a weak function is used in recordmcount.pl
  tracing: Move conditional into update_funcs() in recordmcount.pl
  tracing: Add regex for weak functions in recordmcount.pl
  tracing: Move mcount section search to front of loop in recordmcount.pl
  tracing: Fix objcopy revision check in recordmcount.pl
  tracing: Check absolute path of input file in recordmcount.pl
  tracing: Correct the check for number of arguments in recordmcount.pl
  ...
2009-12-05 09:53:36 -08:00
Linus Torvalds 22763c5cf3 Linux 2.6.32 2009-12-02 19:51:21 -08:00
Linus Torvalds 648f4e3e50 Linux 2.6.32-rc8 2009-11-19 14:32:38 -08:00
Linus Torvalds cb20c28a9c Merge branch 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc
* 'hostprogs-wmissing-prototypes' of git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux-misc:
  Makefile: Add -Wmising-prototypes to HOSTCFLAGS
  oss: Mark loadhex static in hex2hex.c
  dtc: Mark various internal functions static
  dtc: Set "noinput" in the lexer to avoid an unused function
  drm: radeon: Mark several functions static in mkregtable
  arch/sparc/boot/*.c: Mark various internal functions static
  arch/powerpc/boot/addRamDisk.c: Mark several internal functions static
  arch/alpha/boot/tools/objstrip.c: Mark "usage" static
  Documentation/vm/page-types.c: Declare checked_open static
  genksyms: Mark is_reserved_word static
  kconfig: Mark various internal functions static
  kconfig: Make zconf.y work with current bison
2009-11-17 09:14:49 -08:00
Steven Rostedt 638adb0561 tracing: Only print objcopy version warning once from recordmcount
If the user has an older version of objcopy, that can not handle
converting local symbols to global and vice versa, then some
functions will not be part of the dynamic function tracer. The current
code in recordmcount.pl will print a warning in this case. Unfortunately,
there exists lots of files that may have this issue with older objcopys
and this will cause a warning for every file compiled with this
issue.

This patch solves this overwhelming output by creating a
.tmp_quiet_recordmcount file on the first instance the warning is
encountered. The warning will not print if this file exists.

The temp file is deleted at the beginning of the compile to ensure that
the warning will happen once again on new compiles (because the issue
is still present).

Reported-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
2009-11-17 11:05:52 -05:00
Josh Triplett 25583d4b5a Makefile: Add -Wmising-prototypes to HOSTCFLAGS
Now that all host programs use static for all private functions and
forward prototypes for all extern functions, add -Wmissing-prototypes to
HOSTCFLAGS in the hopes of keeping it that way.

All versions of GCC supported by the kernel handle -Wmissing-prototypes.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
2009-11-15 15:01:42 -08:00
Linus Torvalds 156171c71a Linux 2.6.32-rc7 2009-11-12 16:46:07 -08:00
Linus Torvalds b419148e56 Linux 2.6.32-rc6 2009-11-03 11:37:49 -08:00
Linus Torvalds 012abeea66 Linux 2.6.32-rc5 2009-10-15 17:41:50 -07:00
Linus Torvalds 25d591587d Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: revert "save ARCH & CROSS_COMPILE ..."
  warn about use of uninstalled kernel headers
  kbuild: mkcompile_h: trivial cleanups
  kbuild: fix warning when domainname is not available
  kbuild: Fix size_append issue for bzip2/lzma kernel
  kbuild,scripts: use non-builtin echo for '-e'
  kbuild: fix the binrpm-pkg target to work with KBUILD_OUTPUT set
2009-10-13 10:20:53 -07:00
Linus Torvalds 161291396e Linux 2.6.32-rc4 2009-10-11 14:43:56 -07:00
Sam Ravnborg 2331d1a6cd kbuild: revert "save ARCH & CROSS_COMPILE ..."
Revert commit 575543347b

It caused following issues:

- On architectures where ARCH= setting is used to select between
  32 and 64 bit this was no longer possible without "make mrproper"
- If ARCH was changed then kbuild refused to run "make mrproper"
  because ARCH had changed
- When CROSS_COMPILE was changed people were asked to run "make mrproper"
  but kbuild refused to run "make mrproper" because CROSS_COMPILE changed.
- Spaces in CROSS_COMPILE was not 'supported'
- If an non-existing ARCH= was used kbuild could get stuck

Lessons learned:
. Despite being simple and straghtforward people uses very different
  approaches when building the kernel.

. CROSS_COMPILE is sometimes used for ccache despite cache being
  only a CC frontend so one would have expected CC to be
  used for this purpose.

. And obviously this was not tested widely enough.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
2009-10-11 23:22:58 +02:00
Linus Torvalds 374576a8b6 Linux 2.6.32-rc3
I'm skipping -rc2 because the -rc1 Makefile mistakenly said -rc2, so in
order to avoid confusion, I'm jumping from -rc1 to -rc3.  That way, when
'uname' (or an oops report) says 2.6.32-rc2, there's no confusion about
whether people perhaps meant -rc1 or -rc2.
2009-10-04 17:12:30 -07:00
Linus Torvalds 17d857be64 Linux 2.6.32-rc1 2009-09-27 14:57:48 -07:00
Sam Ravnborg 51b563fc93 arm, cris, mips, sparc, powerpc, um, xtensa: fix build with bash 4.0
Albin Tonnerre <albin.tonnerre@free-electrons.com> reported:

    Bash 4 filters out variables which contain a dot in them.
    This happends to be the case of CPPFLAGS_vmlinux.lds.
    This is rather unfortunate, as it now causes
    build failures when using SHELL=/bin/bash to compile,
    or when bash happens to be used by make (eg when it's /bin/sh)

Remove the common definition of CPPFLAGS_vmlinux.lds by
pushing relevant stuff to either Makefile.build or the
arch specific kernel/Makefile where we build the linker script.

This is also nice cleanup as we move the information out where
it is used.

Notes for the different architectures touched:

arm - we use an already exported symbol
cris - we use a config symbol aleady available
       [Not build tested]
mips - the jiffies complexity has moved to vmlinux.lds.S where we need it.
       Added a few variables to CPPFLAGS - they are only used by
       the linker script.
       [Not build tested]
powerpc - removed assignment that is not needed
          [not build tested]
sparc - simplified it using $(BITS)
um - introduced a few new exported variables to deal with this
xtensa - added options to CPP invocation
         [not build tested]

Cc: Albin Tonnerre <albin.tonnerre@free-electrons.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20 12:28:22 +02:00
Andi Kleen 8f7f5c9fc2 kbuild: set -fconserve-stack option for gcc 4.5
The upcomming gcc 4.5 has a new -fconserve-stack option that tells the
inliner to take stack frame size in account.  Set it if the compiler
supports it.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20 12:27:44 +02:00
Andi Kleen d79a27195a kbuild: Check if linker supports the -X option
The new alternative `gold' linker in recent binutils doesn't support
the -X option. This breaks allyesconfig builds that have
CONFIG_STRIP_ASM_SYMS enabled. Check if the linker really supports
the option using ld-option.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20 12:27:42 +02:00
Sam Ravnborg f86fd30660 kbuild: rename ld-option to cc-ldoption
ld-option is misnamed as it test options to gcc, not to ld.
Renamed it to reflect this.

Cc: Andi Kleen <andi@firstfloor.org>
Cc: Roland McGrath <roland@redhat.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-09-20 12:27:42 +02:00
Sam Ravnborg 575543347b 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>
2009-09-20 12:24:55 +02:00