[OE-core] [PATCH V3 1/2] multilib_header_wrapper.h: Use #pragma once

Khem Raj raj.khem at gmail.com
Tue Feb 5 00:36:26 UTC 2019

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

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

Signed-off-by: Khem Raj <raj.khem at gmail.com>
 - No Changes, just rebased
 - Do it using pragma once instead

 scripts/multilib_header_wrapper.h | 1 +
 1 file changed, 1 insertion(+)

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

More information about the Openembedded-core mailing list