diff options
| author | Khem Raj <raj.khem@gmail.com> | 2019-02-04 16:36:26 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-02-06 08:29:06 +0000 |
| commit | 362aa431d853cec7c9397e71d4d59aa7edf19314 (patch) | |
| tree | fef3ab96f201d124a7623517c2c33df19fc6f322 /scripts | |
| parent | 65a7662c5b83d56b7baff5cc4ee79051c3ced18c (diff) | |
| download | poky-362aa431d853cec7c9397e71d4d59aa7edf19314.tar.gz | |
multilib_header_wrapper.h: Use #pragma once
Avoid infinite include loops, especially with bits/wordsize.h which is
now possible with the synthesized headers since we now also synthesize
bits/wordsize.h itelf for some arches e.g. arm/aarch64
In cases where extra preprocessing tools are used such as clang-tidy
e.g. and these tools are not passed the knowledge about architecture
then case comes where we enter into header include loop for
bits/wordsize.h, since this template does explicitly include
bits/wordsize.h
To fix this emits the pragma once at beginning of file, this is better
solution than include guards, and pragma once is practically supported
on all compilers except few e.g. cray c/c++ compiler
(From OE-Core rev: 6ab11ac25bb987642d5ca1a07f4bd5f30c66c9c5)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/multilib_header_wrapper.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scripts/multilib_header_wrapper.h b/scripts/multilib_header_wrapper.h index 9660225fdd..4824790783 100644 --- a/scripts/multilib_header_wrapper.h +++ b/scripts/multilib_header_wrapper.h | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | * | 21 | * |
| 22 | */ | 22 | */ |
| 23 | 23 | ||
| 24 | #pragma once | ||
| 24 | 25 | ||
| 25 | #if defined (__bpf__) | 26 | #if defined (__bpf__) |
| 26 | #define __MHWORDSIZE 64 | 27 | #define __MHWORDSIZE 64 |
