Commit 274c8485 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Benjamin Cabé
Browse files

linker: undefine the no-ops dt macros at the end of the file

Undefine the DT_NODE_HAS_STATUS and DT_NODE_HAS_STATUS_OKAY no nop at
the end of the file so other uses can include devicetree.h without
generating a compiler warning.

Signed-off-by: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 7635455f
Loading
Loading
Loading
Loading
+6 −1
Changes for include/zephyr/linker/linker-defs.h: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@
/* We need to dummy out DT_NODE_HAS_STATUS when building the unittests.
 * Including devicetree.h would require generating dummy header files
 * to match what gen_defines creates, so it's easier to just dummy out
 * DT_NODE_HAS_STATUS.
 * DT_NODE_HAS_STATUS. These are undefined at the end of the file.
 */
#ifdef ZTEST_UNITTEST
#define DT_NODE_HAS_STATUS(node, status) 0
@@ -359,4 +359,9 @@ extern char lnkr_ondemand_rodata_size[];
#endif /* CONFIG_LINKER_USE_ONDEMAND_SECTION */
#endif /* ! _ASMLANGUAGE */

#ifdef ZTEST_UNITTEST
#undef DT_NODE_HAS_STATUS
#undef DT_NODE_HAS_STATUS_OKAY
#endif

#endif /* ZEPHYR_INCLUDE_LINKER_LINKER_DEFS_H_ */