mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
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: 86c01a73ff
("lib: sbi: Avoid GOT indirection for global symbol references")
Signed-off-by: Jessica Clarke <jrtc27@jrtc27.com>
Reviewed-by: Samuel Holland <samuel.holland@sifive.com>
Tested-by: Xiang W <wxjstz@126.com>
Reviewed-by: Xiang W <wxjstz@126.com>
Link: https://lore.kernel.org/r/20250709232840.37551-1-jrtc27@jrtc27.com
Signed-off-by: Anup Patel <anup@brainfault.org>
This commit is contained in:

committed by
Anup Patel

parent
3876f8cd1e
commit
4825a3f87f
@@ -7,10 +7,12 @@
|
|||||||
#ifndef __SBI_VISIBILITY_H__
|
#ifndef __SBI_VISIBILITY_H__
|
||||||
#define __SBI_VISIBILITY_H__
|
#define __SBI_VISIBILITY_H__
|
||||||
|
|
||||||
|
#ifndef __DTS__
|
||||||
/*
|
/*
|
||||||
* Declare all global objects with hidden visibility so access is PC-relative
|
* Declare all global objects with hidden visibility so access is PC-relative
|
||||||
* instead of going through the GOT.
|
* instead of going through the GOT.
|
||||||
*/
|
*/
|
||||||
#pragma GCC visibility push(hidden)
|
#pragma GCC visibility push(hidden)
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user