]> git.itanic.dy.fi Git - linux-stable/commit
compiler.h: unify __UNIQUE_ID
authorNick Desaulniers <ndesaulniers@google.com>
Thu, 31 Aug 2023 16:33:40 +0000 (09:33 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Wed, 4 Oct 2023 17:41:56 +0000 (10:41 -0700)
commita8306f2d4dcea03538c70c26d2948483f70254ff
tree96e9888099e6249fa519b854eb76957ea16c8433
parentc0d2f4ce5c9fbc3e3b219d828b77ecd4445c1ad2
compiler.h: unify __UNIQUE_ID

commit 6f33d58794ef ("__UNIQUE_ID()")
added a fallback definition of __UNIQUE_ID because gcc 4.2 and older did
not support __COUNTER__.

Also, this commit is effectively a revert of
commit b41c29b0527c ("Kbuild: provide a __UNIQUE_ID for clang")
which mentions clang 2.6+ supporting __COUNTER__.

Documentation/process/changes.rst currently lists the minimum supported
version of these compilers as:
- gcc: 5.1
- clang: 11.0.0
It should be safe to say that __COUNTER__ is well supported by this
point.

Link: https://lkml.kernel.org/r/20230831-unique_id-v1-1-28bacd18eb1d@google.com
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Michal rarek <mmarek@suse.com>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Paul Russel <rusty@rustcorp.com.au>
Cc: Tom Rix <trix@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/compiler-clang.h
include/linux/compiler-gcc.h
include/linux/compiler.h