aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2025-03-13 20:27:18 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2025-03-14 13:51:31 +1100
commitf4c53f4ebf7809a07666bf728c823005e1f1a612 (patch)
tree2c092a574523d338f21162f67a040aed71b2d4a0 /tests
parent205fbef17b7b2f410e34ac79aa1559a8d492b66c (diff)
downloaddtc-master.zip
dtc-master.tar.gz
dtc-master.tar.bz2
Use __ASSEMBLER__ instead of __ASSEMBLY__HEADmastermain
Both, Clang and GCC define __ASSEMBLER__ automatically when compiling .S files, so this macro is a much better fit for fdt.h - programs that want to use it from .S files don't have to manually #define __ASSEMBLY__ that way. While we're at it, also change it in testdata.h, then we don't have to define __ASSEMBLY__ in the Makefile / meson.build file anymore. Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20250313192718.1561683-1-thuth@redhat.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'tests')
-rw-r--r--tests/meson.build2
-rw-r--r--tests/testdata.h6
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 52d657e..37bfd47 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,4 +1,4 @@
-trees = static_library('trees', files('trees.S'), c_args: '-D__ASSEMBLY__',
+trees = static_library('trees', files('trees.S'),
build_by_default: false,
include_directories: libfdt_inc)
diff --git a/tests/testdata.h b/tests/testdata.h
index 4f9e3ba..fcebc2c 100644
--- a/tests/testdata.h
+++ b/tests/testdata.h
@@ -1,4 +1,4 @@
-#ifdef __ASSEMBLY__
+#ifdef __ASSEMBLER__
#define ASM_CONST_LL(x) (x)
#else
#define ASM_CONST_LL(x) (x##ULL)
@@ -46,7 +46,7 @@
#define TEST_MEMREGION_SIZE_HI 0x0fedcba900000000
#define TEST_MEMREGION_SIZE_INC 0x1000
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
extern struct fdt_header test_tree1;
extern struct fdt_header truncated_property;
extern struct fdt_header bad_node_char;
@@ -57,4 +57,4 @@ extern struct fdt_header truncated_string;
extern struct fdt_header truncated_memrsv;
extern struct fdt_header two_roots;
extern struct fdt_header named_root;
-#endif /* ! __ASSEMBLY */
+#endif /* ! __ASSEMBLER__ */