mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-13 16:27:39 -04:00
Use __ASSEMBLER__ instead of __ASSEMBLY__
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>
This commit is contained in:
parent
205fbef17b
commit
f4c53f4ebf
4 changed files with 7 additions and 7 deletions
2
Makefile
2
Makefile
|
@ -360,7 +360,7 @@ clean: libfdt_clean pylibfdt_clean tests_clean
|
||||||
|
|
||||||
%.o: %.S
|
%.o: %.S
|
||||||
@$(VECHO) AS $@
|
@$(VECHO) AS $@
|
||||||
$(CC) $(CPPFLAGS) $(AFLAGS) -D__ASSEMBLY__ -o $@ -c $<
|
$(CC) $(CPPFLAGS) $(AFLAGS) -o $@ -c $<
|
||||||
|
|
||||||
%.d: %.c
|
%.d: %.c
|
||||||
@$(VECHO) DEP $<
|
@$(VECHO) DEP $<
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
* Copyright 2012 Kim Phillips, Freescale Semiconductor.
|
* Copyright 2012 Kim Phillips, Freescale Semiconductor.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLER__
|
||||||
|
|
||||||
struct fdt_header {
|
struct fdt_header {
|
||||||
fdt32_t magic; /* magic word FDT_MAGIC */
|
fdt32_t magic; /* magic word FDT_MAGIC */
|
||||||
|
@ -45,7 +45,7 @@ struct fdt_property {
|
||||||
char data[];
|
char data[];
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* !__ASSEMBLY */
|
#endif /* !__ASSEMBLER__ */
|
||||||
|
|
||||||
#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
|
#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
|
||||||
#define FDT_TAGSIZE sizeof(fdt32_t)
|
#define FDT_TAGSIZE sizeof(fdt32_t)
|
||||||
|
|
|
@ -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,
|
build_by_default: false,
|
||||||
include_directories: libfdt_inc)
|
include_directories: libfdt_inc)
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
#ifdef __ASSEMBLY__
|
#ifdef __ASSEMBLER__
|
||||||
#define ASM_CONST_LL(x) (x)
|
#define ASM_CONST_LL(x) (x)
|
||||||
#else
|
#else
|
||||||
#define ASM_CONST_LL(x) (x##ULL)
|
#define ASM_CONST_LL(x) (x##ULL)
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
#define TEST_MEMREGION_SIZE_HI 0x0fedcba900000000
|
#define TEST_MEMREGION_SIZE_HI 0x0fedcba900000000
|
||||||
#define TEST_MEMREGION_SIZE_INC 0x1000
|
#define TEST_MEMREGION_SIZE_INC 0x1000
|
||||||
|
|
||||||
#ifndef __ASSEMBLY__
|
#ifndef __ASSEMBLER__
|
||||||
extern struct fdt_header test_tree1;
|
extern struct fdt_header test_tree1;
|
||||||
extern struct fdt_header truncated_property;
|
extern struct fdt_header truncated_property;
|
||||||
extern struct fdt_header bad_node_char;
|
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 truncated_memrsv;
|
||||||
extern struct fdt_header two_roots;
|
extern struct fdt_header two_roots;
|
||||||
extern struct fdt_header named_root;
|
extern struct fdt_header named_root;
|
||||||
#endif /* ! __ASSEMBLY */
|
#endif /* ! __ASSEMBLER__ */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue