Commit Graph

845 Commits

Author SHA1 Message Date
Masahiro Yamada 413b7c456f kbuild: create a build directory automatically for out-of-tree build
Kbuild supports saving output files in a separate directory.
But the build directory must be created beforehand. For example,

  $ mkdir -p dir/to/store/output/files
  $ make O=dir/to/store/output/files defconfig

Creating a build directory automatically would be useful.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Change-Id: Ibfbf1509a2b001261234f421babb621106345e5b
2021-11-25 13:38:52 +01:00
flar2 8070e395ae Adjust Makefiles 2020-06-02 17:16:55 +02:00
Linus Torvalds 2599c1d9c5 Disable "maybe-uninitialized" warning globally
Several build configurations had already disabled this warning because
it generates a lot of false positives.  But some had not, and it was
still enabled for "allmodconfig" builds, for example.

Looking at the warnings produced, every single one I looked at was a
false positive, and the warnings are frequent enough (and big enough)
that they can easily hide real problems that you don't notice in the
noise generated by -Wmaybe-uninitialized.

The warning is good in theory, but this is a classic case of a warning
that causes more problems than the warning can solve.

If gcc gets better at avoiding false positives, we may be able to
re-enable this warning.  But as is, we're better off without it, and I
want to be able to see the *real* warnings.

Change-Id: Ie810d255be8911c413c9abe6965a9a66639a1dce
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-01-13 17:13:46 +03:00
Artem Borisov d7992e6feb Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1
All bluetooth-related changes were omitted because of our ancient incompatible bt stack.

Change-Id: I96440b7be9342a9c1adc9476066272b827776e64
2017-12-27 17:13:15 +03:00
Arnd Bergmann 0639e5b7f3 Turn off -Wmaybe-uninitialized when building with -Os
gcc-4.7 and higher add a lot of false positive warnings about
potential uses of uninitialized warnings, but only when optimizing
for size (-Os). This is the default when building allyesconfig,
which turns on CONFIG_CC_OPTIMIZE_FOR_SIZE.

In order to avoid getting a lot of patches that initialize such
variables and accidentally hide real errors along the way, let's
just turn off this warning on the respective gcc versions
when building with size optimizations. The -Wmaybe-uninitialized
option was introduced in the same gcc version (4.7) that is now
causing the false positives, so there is no effect on older compilers.

A side effect is that when building with CONFIG_CC_OPTIMIZE_FOR_SIZE,
we might now see /fewer/ warnings about possibly uninitialized
warnings than with -O2, but that is still much better than seeing
warnings known to be bogus.

Change-Id: I5a863923ad347526e6dc58c0bbbc259eb20bfe5c
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Git-commit: e74fc973b6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Bryan Huntsman <bryanh@codeaurora.org>
2016-10-29 23:12:41 +08:00
Linus Torvalds 65d9c4cc92 Fix gcc-4.9.0 miscompilation of load_balance() in scheduler
commit 2062afb4f8 upstream.

Michel Dänzer and a couple of other people reported inexplicable random
oopses in the scheduler, and the cause turns out to be gcc mis-compiling
the load_balance() function when debugging is enabled.  The gcc bug
apparently goes back to gcc-4.5, but slight optimization changes means
that it now showed up as a problem in 4.9.0 and 4.9.1.

The instruction scheduling problem causes gcc to schedule a spill
operation to before the stack frame has been created, which in turn can
corrupt the spilled value if an interrupt comes in.  There may be other
effects of this bug too, but that's the code generation problem seen in
Michel's case.

This is fixed in current gcc HEAD, but the workaround as suggested by
Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
when compiling the kernel, which disables the gcc code that causes the
problem.  This can result in slightly worse debug information for
variable accesses, but that is infinitely preferable to actual code
generation problems.

Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
non-debug builds to verify that the debug build would be identical: we
can do

    export GCC_COMPARE_DEBUG=1

to make gcc internally verify that the result of the build is
independent of the "-g" flag (it will make the compiler build everything
twice, toggling the debug flag, and compare the results).

Without the "-fno-var-tracking-assignments" option, the build would fail
(even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
compare failure.

See also gcc bugzilla:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801

Reported-by: Michel Dänzer <michel@daenzer.net>
Suggested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-29 23:12:27 +08:00
Zefan Li 8d1988f838 Linux 3.4.113 2016-10-26 23:15:47 +08:00
Zefan Li 343a5fbeef Linux 3.4.112 2016-04-27 18:55:30 +08:00
Zefan Li 3389604d77 Linux 3.4.111 2016-03-21 09:17:59 +08:00
Zefan Li 3edd6224c2 Linux 3.4.110 2015-10-22 09:20:09 +08:00
Zefan Li 4a55c0cfdd Linux 3.4.109 2015-09-18 09:20:47 +08:00
Zefan Li cf1b3dad6c Linux 3.4.108 2015-06-19 11:40:35 +08:00
Zefan Li 56b48fcda5 Linux 3.4.107 2015-04-14 17:34:05 +08:00
Zefan Li 28895317f9 Linux 3.4.106 2015-02-02 17:05:26 +08:00
Zefan Li 7fd7a446b1 Linux 3.4.105 2014-12-01 18:02:45 +08:00
Zefan Li bb4a05a040 Linux 3.4.104 2014-09-25 11:49:19 +08:00
Greg Kroah-Hartman 9f089cfb4b Linux 3.4.103 2014-08-14 09:07:43 +08:00
Greg Kroah-Hartman 0a9d91dca3 Linux 3.4.102 2014-08-07 13:54:57 -07:00
Greg Kroah-Hartman 91f7c8cbc8 Linux 3.4.101 2014-07-31 14:56:22 -07:00
Linus Torvalds e5c662d1f7 Fix gcc-4.9.0 miscompilation of load_balance() in scheduler
commit 2062afb4f8 upstream.

Michel Dänzer and a couple of other people reported inexplicable random
oopses in the scheduler, and the cause turns out to be gcc mis-compiling
the load_balance() function when debugging is enabled.  The gcc bug
apparently goes back to gcc-4.5, but slight optimization changes means
that it now showed up as a problem in 4.9.0 and 4.9.1.

The instruction scheduling problem causes gcc to schedule a spill
operation to before the stack frame has been created, which in turn can
corrupt the spilled value if an interrupt comes in.  There may be other
effects of this bug too, but that's the code generation problem seen in
Michel's case.

This is fixed in current gcc HEAD, but the workaround as suggested by
Markus Trippelsdorf is pretty simple: use -fno-var-tracking-assignments
when compiling the kernel, which disables the gcc code that causes the
problem.  This can result in slightly worse debug information for
variable accesses, but that is infinitely preferable to actual code
generation problems.

Doing this unconditionally (not just for CONFIG_DEBUG_INFO) also allows
non-debug builds to verify that the debug build would be identical: we
can do

    export GCC_COMPARE_DEBUG=1

to make gcc internally verify that the result of the build is
independent of the "-g" flag (it will make the compiler build everything
twice, toggling the debug flag, and compare the results).

Without the "-fno-var-tracking-assignments" option, the build would fail
(even with 4.8.3 that didn't show the actual stack frame bug) with a gcc
compare failure.

See also gcc bugzilla:

  https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61801

Reported-by: Michel Dänzer <michel@daenzer.net>
Suggested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Cc: Jakub Jelinek <jakub@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-31 12:54:52 -07:00
Greg Kroah-Hartman 82f9c4a309 Linux 3.4.100 2014-07-28 07:07:01 -07:00
Greg Kroah-Hartman 0758142f8a Linux 3.4.99 2014-07-17 15:55:52 -07:00
Greg Kroah-Hartman 0bbbf93fb1 Linux 3.4.98 2014-07-09 10:52:25 -07:00
Greg Kroah-Hartman 79136399ed Linux 3.4.97 2014-07-06 18:50:29 -07:00
Greg Kroah-Hartman 3e3d5f6146 Linux 3.4.96 2014-06-30 20:05:38 -07:00
Greg Kroah-Hartman 12470e74f3 Linux 3.4.95 2014-06-26 15:10:41 -04:00
Greg Kroah-Hartman 95f3bb9bd6 Linux 3.4.94 2014-06-16 13:46:06 -07:00
Greg Kroah-Hartman c75c3b96fa Linux 3.4.93 2014-06-11 12:25:24 -07:00
Greg Kroah-Hartman 22feaed11f Linux 3.4.92 2014-06-07 16:02:54 -07:00
Greg Kroah-Hartman 25c7b871a0 Linux 3.4.91 2014-05-18 05:26:09 -07:00
Greg Kroah-Hartman f39c8bf9da Linux 3.4.90 2014-05-13 14:11:45 +02:00
Greg Kroah-Hartman d89a13cf5f Linux 3.4.89 2014-05-06 07:52:14 -07:00
Greg Kroah-Hartman 5c5994f5a1 Linux 3.4.88 2014-04-26 17:13:46 -07:00
Greg Kroah-Hartman 9660cc51f8 Linux 3.4.87 2014-04-14 06:45:17 -07:00
Greg Kroah-Hartman 7ae240637a Linux 3.4.86 2014-04-03 11:59:21 -07:00
Greg Kroah-Hartman 72cb2a7f42 Linux 3.4.85 2014-03-30 21:40:45 -07:00
Greg Kroah-Hartman b1cee752ee Linux 3.4.84 2014-03-23 21:38:33 -07:00
Greg Kroah-Hartman 0c4f5371eb Linux 3.4.83 2014-03-11 16:10:41 -07:00
Greg Kroah-Hartman 2606524141 Linux 3.4.82 2014-02-22 10:33:35 -08:00
Greg Kroah-Hartman dd12c7c4cb Linux 3.4.81 2014-02-20 10:46:04 -08:00
Greg Kroah-Hartman a6d2ebcda7 Linux 3.4.80 2014-02-13 13:00:25 -08:00
Greg Kroah-Hartman e3b1f4138a Linux 3.4.79 2014-02-06 11:05:59 -08:00
Greg Kroah-Hartman a13224074a Linux 3.4.78 2014-01-29 05:11:12 -08:00
Greg Kroah-Hartman 4b9c8e9bd1 Linux 3.4.77 2014-01-15 15:27:19 -08:00
Greg Kroah-Hartman 94f578e6ab Linux 3.4.76 2014-01-08 09:42:33 -08:00
Greg Kroah-Hartman 84dfcb758b Linux 3.4.75 2013-12-20 07:34:35 -08:00
Greg Kroah-Hartman 827f121bfd Linux 3.4.74 2013-12-11 22:34:28 -08:00
Greg Kroah-Hartman 50b673d2fe Linux 3.4.73 2013-12-08 08:12:17 -08:00
Greg Kroah-Hartman 44d19f5a04 Linux 3.4.72 2013-12-04 10:50:53 -08:00
Greg Kroah-Hartman 71ea173874 Linux 3.4.71 2013-11-29 10:50:58 -08:00