Changeset ff68bcc in rtems-tools


Ignore:
Timestamp:
05/12/22 07:19:23 (3 months ago)
Author:
Karel Gardas <karel@…>
Branches:
master
Children:
f199d42
Parents:
072f88f
git-author:
Karel Gardas <karel@…> (05/12/22 07:19:23)
git-committer:
Chris Johns <chrisj@…> (05/17/22 11:19:49)
Message:

rtemstoolkit:libelf: sync _libelf_config.h with FreeBSD

This fixes compilation issue on Apple M1.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • rtemstoolkit/elftoolchain/libelf/_libelf_config.h

    r072f88f rff68bcc  
    2424 * SUCH DAMAGE.
    2525 *
    26  * $Id: _libelf_config.h 3566 2017-08-31 02:28:40Z emaste $
     26 * $Id: _libelf_config.h 3764 2019-06-28 21:44:46Z emaste $
    2727 */
    2828
    29 #if defined(__APPLE__) || defined(__DragonFly__)
    30 
    31 #if     defined(__amd64__)
    32 #define LIBELF_ARCH             EM_X86_64
    33 #define LIBELF_BYTEORDER        ELFDATA2LSB
    34 #define LIBELF_CLASS            ELFCLASS64
    35 #elif   defined(__i386__)
    36 #define LIBELF_ARCH             EM_386
    37 #define LIBELF_BYTEORDER        ELFDATA2LSB
    38 #define LIBELF_CLASS            ELFCLASS32
    39 #endif
    40 
    41 #endif  /* __DragonFly__ */
    42 
    43 #ifdef __FreeBSD__
     29#if defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__)
    4430
    4531/*
    4632 * Define LIBELF_{ARCH,BYTEORDER,CLASS} based on the machine architecture.
    47  * See also: <machine/elf.h>.
     33 * See also: <machine/elf.h> on FreeBSD.
    4834 */
    4935
     
    9278#define LIBELF_CLASS            ELFCLASS32
    9379
     80#elif   defined(__powerpc64__)
     81
     82#define LIBELF_ARCH             EM_PPC64
     83#if     __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
     84#define LIBELF_BYTEORDER        ELFDATA2LSB
     85#else
     86#define LIBELF_BYTEORDER        ELFDATA2MSB
     87#endif
     88#define LIBELF_CLASS            ELFCLASS64
     89
    9490#elif   defined(__powerpc__)
    9591
     
    104100#define LIBELF_CLASS            ELFCLASS64
    105101
     102#elif   defined(__riscv64)
     103
     104#define LIBELF_ARCH             EM_RISCV
     105#define LIBELF_BYTEORDER        ELFDATA2LSB
     106#define LIBELF_CLASS            ELFCLASS64
     107
    106108#elif   defined(__sparc__)
    107109
     
    111113
    112114#else
    113 #error  Unknown FreeBSD architecture.
     115#error  Unknown architecture.
    114116#endif
    115 #endif  /* __FreeBSD__ */
     117#endif  /*  defined(__APPLE__) || defined(__DragonFly__) || defined(__FreeBSD__) */
    116118
    117119/*
     
    188190
    189191#endif /* defined(__linux__) || defined(__GNU__) || defined(__GLIBC__) */
    190 
    191 #if defined(__WIN32__) || defined(__CYGWIN__)
    192 
    193 #define LIBELF_VCSID(ID)
    194 
    195 #if     defined(__amd64__)
    196 
    197 #define LIBELF_ARCH             EM_X86_64
    198 #define LIBELF_BYTEORDER        ELFDATA2LSB
    199 #define LIBELF_CLASS            ELFCLASS64
    200 
    201 #elif   defined(__i386__)
    202 
    203 #define LIBELF_ARCH             EM_386
    204 #define LIBELF_BYTEORDER        ELFDATA2LSB
    205 #define LIBELF_CLASS            ELFCLASS32
    206 
    207 #else
    208 #error  Unknown Windows architecture.
    209 #endif
    210 
    211 #endif  /* __WIN32__ || __CYGWIN__ */
Note: See TracChangeset for help on using the changeset viewer.