* [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean
@ 2014-02-13 21:28 Paul Gortmaker
2014-02-15 22:54 ` David Howells
2014-03-29 20:00 ` Michal Marek
0 siblings, 2 replies; 3+ messages in thread
From: Paul Gortmaker @ 2014-02-13 21:28 UTC (permalink / raw)
To: linux-kernel; +Cc: Paul Gortmaker, Michal Marek, David Howells
As of v3.7, the UAPI changes relocated headers around such that the
kernel version header lived in a new place.
If a person is bisecting and if you go back to pre-UAPI days,
you will create an include/linux/version.h -- then if you checkout a
post-UAPI kernel, and even run "make distclean" it still won't delete
that old version file. So you get a situation like this:
$ grep -R LINUX_VERSION_CODE include/
include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
include/linux/version.h:#define LINUX_VERSION_CODE 132646
The value in that second line is representative of a v2.6.38 version.
And it will be sourced/used, hence leading to strange behaviours, such
as drivers/staging content (which typically hasn't been purged of version
ifdefs) failing to build.
Since it is a subtle mode of failure, lets always clobber the old
file when doing a distclean.
Cc: Michal Marek <mmarek@suse.cz>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/Makefile b/Makefile
index fd6a01ed9ab9..1342363ca10d 100644
--- a/Makefile
+++ b/Makefile
@@ -1071,7 +1071,7 @@ MRPROPER_FILES += .config .config.old .version .old_version $(version_h) \
Module.symvers tags TAGS cscope* GPATH GTAGS GRTAGS GSYMS \
signing_key.priv signing_key.x509 x509.genkey \
extra_certificates signing_key.x509.keyid \
- signing_key.x509.signer
+ signing_key.x509.signer include/linux/version.h
# clean - Delete most, but leave enough to build external modules
#
--
1.8.5.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean
2014-02-13 21:28 [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean Paul Gortmaker
@ 2014-02-15 22:54 ` David Howells
2014-03-29 20:00 ` Michal Marek
1 sibling, 0 replies; 3+ messages in thread
From: David Howells @ 2014-02-15 22:54 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: dhowells, linux-kernel, Michal Marek
Paul Gortmaker <paul.gortmaker@windriver.com> wrote:
> As of v3.7, the UAPI changes relocated headers around such that the
> kernel version header lived in a new place.
>
> If a person is bisecting and if you go back to pre-UAPI days,
> you will create an include/linux/version.h -- then if you checkout a
> post-UAPI kernel, and even run "make distclean" it still won't delete
> that old version file. So you get a situation like this:
>
> $ grep -R LINUX_VERSION_CODE include/
> include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
> include/linux/version.h:#define LINUX_VERSION_CODE 132646
>
> The value in that second line is representative of a v2.6.38 version.
> And it will be sourced/used, hence leading to strange behaviours, such
> as drivers/staging content (which typically hasn't been purged of version
> ifdefs) failing to build.
>
> Since it is a subtle mode of failure, lets always clobber the old
> file when doing a distclean.
>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: David Howells <dhowells@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean
2014-02-13 21:28 [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean Paul Gortmaker
2014-02-15 22:54 ` David Howells
@ 2014-03-29 20:00 ` Michal Marek
1 sibling, 0 replies; 3+ messages in thread
From: Michal Marek @ 2014-03-29 20:00 UTC (permalink / raw)
To: Paul Gortmaker; +Cc: linux-kernel, David Howells
Dne 13.2.2014 22:28, Paul Gortmaker napsal(a):
> As of v3.7, the UAPI changes relocated headers around such that the
> kernel version header lived in a new place.
>
> If a person is bisecting and if you go back to pre-UAPI days,
> you will create an include/linux/version.h -- then if you checkout a
> post-UAPI kernel, and even run "make distclean" it still won't delete
> that old version file. So you get a situation like this:
>
> $ grep -R LINUX_VERSION_CODE include/
> include/generated/uapi/linux/version.h:#define LINUX_VERSION_CODE 200192
> include/linux/version.h:#define LINUX_VERSION_CODE 132646
>
> The value in that second line is representative of a v2.6.38 version.
> And it will be sourced/used, hence leading to strange behaviours, such
> as drivers/staging content (which typically hasn't been purged of version
> ifdefs) failing to build.
>
> Since it is a subtle mode of failure, lets always clobber the old
> file when doing a distclean.
>
> Cc: Michal Marek <mmarek@suse.cz>
> Cc: David Howells <dhowells@redhat.com>
> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Applied to kbuild.git, sorry for the delay. I'm curious how long will it
take until somebody posts a cleanup patch removing the obsolete
include/linux/version.h reference...
Michal
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-03-29 20:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-13 21:28 [PATCH] kbuild: unconditionally clobber include/linux/version.h on distclean Paul Gortmaker
2014-02-15 22:54 ` David Howells
2014-03-29 20:00 ` Michal Marek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.