Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ... (grub-bios-setup): ... and this. (grub-sparc64-setup): ... and this. * configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS. * docs/man/grub-setup.h2m: Split into ... * docs/man/grub-sparc64-setup.h2m: ... this. * docs/man/grub-bios-setup.h2m: ... and this. * include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct. * include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types. (GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove. (grub_target_addr_t): Remove. (grub_target_size_t): Remove. (grub_target_ssize_t): Remove. * util/grub-install.in: Use new grub-*-setup. * util/grub-mkimagexx.c (Elf_Word): New define. (Elf_Half): Likewise. (Elf_Section): Likewise. (ELF_ST_TYPE): Likewise. * util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
This commit is contained in:
parent
584b2f8a22
commit
c36e5cd162
11 changed files with 104 additions and 40 deletions
|
@ -147,6 +147,7 @@ struct grub_dl_dep
|
|||
};
|
||||
typedef struct grub_dl_dep *grub_dl_dep_t;
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
struct grub_dl
|
||||
{
|
||||
char *name;
|
||||
|
@ -164,6 +165,7 @@ struct grub_dl
|
|||
grub_size_t sz;
|
||||
struct grub_dl *next;
|
||||
};
|
||||
#endif
|
||||
typedef struct grub_dl *grub_dl_t;
|
||||
|
||||
grub_dl_t grub_dl_load_file (const char *filename);
|
||||
|
|
|
@ -2331,6 +2331,7 @@ typedef Elf32_Addr Elf32_Conflict;
|
|||
|
||||
#define R_X86_64_NUM 24
|
||||
|
||||
#ifndef GRUB_UTIL
|
||||
#if GRUB_TARGET_WORDSIZE == 32
|
||||
|
||||
typedef Elf32_Addr Elf_Addr;
|
||||
|
@ -2377,5 +2378,6 @@ typedef Elf64_Xword Elf_Xword;
|
|||
#define ELF_R_INFO(sym, type) ELF64_R_INFO(sym, type)
|
||||
|
||||
#endif /* GRUB_TARGET_WORDSIZE == 64 */
|
||||
#endif
|
||||
|
||||
#endif /* ! GRUB_ELF_H */
|
||||
|
|
|
@ -20,7 +20,9 @@
|
|||
#define GRUB_TYPES_HEADER 1
|
||||
|
||||
#include <config.h>
|
||||
#ifndef GRUB_UTIL
|
||||
#include <grub/cpu/types.h>
|
||||
#endif
|
||||
|
||||
#ifdef GRUB_UTIL
|
||||
# define GRUB_CPU_SIZEOF_VOID_P SIZEOF_VOID_P
|
||||
|
@ -48,7 +50,7 @@
|
|||
# error "This architecture is not supported because sizeof(void *) != 4 and sizeof(void *) != 8"
|
||||
#endif
|
||||
|
||||
#ifndef GRUB_TARGET_WORDSIZE
|
||||
#if !defined (GRUB_UTIL) & !defined (GRUB_TARGET_WORDSIZE)
|
||||
# if GRUB_TARGET_SIZEOF_VOID_P == 4
|
||||
# define GRUB_TARGET_WORDSIZE 32
|
||||
# elif GRUB_TARGET_SIZEOF_VOID_P == 8
|
||||
|
@ -82,15 +84,6 @@ typedef unsigned long long grub_uint64_t;
|
|||
#endif
|
||||
|
||||
/* Misc types. */
|
||||
#if GRUB_TARGET_SIZEOF_VOID_P == 8
|
||||
typedef grub_uint64_t grub_target_addr_t;
|
||||
typedef grub_uint64_t grub_target_size_t;
|
||||
typedef grub_int64_t grub_target_ssize_t;
|
||||
#else
|
||||
typedef grub_uint32_t grub_target_addr_t;
|
||||
typedef grub_uint32_t grub_target_size_t;
|
||||
typedef grub_int32_t grub_target_ssize_t;
|
||||
#endif
|
||||
|
||||
#if GRUB_CPU_SIZEOF_VOID_P == 8
|
||||
typedef grub_uint64_t grub_addr_t;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue