path: root/scripts
diff options
authorKhem Raj <>2019-02-04 16:36:26 -0800
committerRichard Purdie <>2019-02-25 22:27:39 +0000
commite9d1be84be7bd1b25f756b3a29dca33c0fdd2ecc (patch)
tree3d4f471f629c2846b95b1b23b32eeae64732f093 /scripts
parent6ea2afed9323d45451f88c9764b9b332a05fb7e4 (diff)
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) (From OE-Core rev: 8f00480fe826ebaff2b78796d757b9e2734f2deb) Signed-off-by: Khem Raj <> Signed-off-by: Richard Purdie <> Signed-off-by: Armin Kuster <> Signed-off-by: Richard Purdie <>
Diffstat (limited to 'scripts')
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 @@
+#pragma once
#if defined (__bpf__)
#define __MHWORDSIZE 64