summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJessica Clarke <[email protected]>2025-07-10 00:28:39 +0100
committerAnup Patel <[email protected]>2025-07-21 16:37:22 +0530
commit4825a3f87f8d3ee45b7f9b76ed62de7bd1f2dfa8 (patch)
tree31a2d4919aa986a6c49ab9e03e68f450914aa4bb
parent3876f8cd1e3c0c203a315bdc6e8ced176bb49e0a (diff)
include: sbi: Don't use #pragma when preprocessing device tree sources
Since this persists in the preprocessed output (so that it can affect the subsequent compilation), it ends up in the input to dtc and is a syntax error, breaking the k210 build. Ideally we wouldn't add the -include flag to DTSCPPFLAGS in the first place as this header is wholly pointless there, but that's a more invasive build system change compared to just making this header safe to include there. Fixes: 86c01a73ff9d ("lib: sbi: Avoid GOT indirection for global symbol references") Signed-off-by: Jessica Clarke <[email protected]> Reviewed-by: Samuel Holland <[email protected]> Tested-by: Xiang W <[email protected]> Reviewed-by: Xiang W <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
-rw-r--r--include/sbi/sbi_visibility.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sbi/sbi_visibility.h b/include/sbi/sbi_visibility.h
index e9c401c5..f900c445 100644
--- a/include/sbi/sbi_visibility.h
+++ b/include/sbi/sbi_visibility.h
@@ -7,10 +7,12 @@
#ifndef __SBI_VISIBILITY_H__
#define __SBI_VISIBILITY_H__
+#ifndef __DTS__
/*
* Declare all global objects with hidden visibility so access is PC-relative
* instead of going through the GOT.
*/
#pragma GCC visibility push(hidden)
+#endif
#endif