freebsd-dev/gnu/usr.bin/binutils/libbfd/Makefile.arm
Warner Losh e8dce5b9b3 Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming.  Any remaining rough edges
will be hammered out in -current.
2010-11-10 06:39:49 +00:00

46 lines
1.3 KiB
Makefile

# $FreeBSD$
.if ${TARGET_ARCH} == "armeb"
DEFAULT_VECTOR= bfd_elf32_bigarm_vec
.else
DEFAULT_VECTOR= bfd_elf32_littlearm_vec
.endif
SRCS+= cpu-arm.c \
elf32.c \
elf32-arm-fbsd.c \
elf32-gen.c \
elf32-target.h \
elflink.c
VECS+= ${DEFAULT_VECTOR}
.if ${TARGET_ARCH} == "armeb"
VECS+= bfd_elf32_littlearm_vec
.else
VECS+= bfd_elf32_bigarm_vec
.endif
CLEANFILES+= elf32-arm-fbsd.c
# XXX: We should really add the FreeBSD case in elf32_arm_nabi_grok_prstatus
# instead of defining our own elf32_fbsd_arm_grok_prstatus.
#
elf32-arm-fbsd.c: elfarm-nabi.c
cat ${.ALLSRC} | sed \
-e s/ELFOSABI_ARM/ELFOSABI_FREEBSD/g \
-e "s/\(.*#define.*\)elf32_arm_nabi_grok_prstatus/\1elf32_fbsd_arm_grok_prstatus/" \
-e s/"#include.*elf32-arm.h.*//" >${.TARGET}
echo ' \
static bfd_boolean \
elf32_fbsd_arm_grok_prstatus(bfd *abfd, Elf_Internal_Note *note) \
{ size_t raw_size =68 ; int offset = 28; \
if (note->descsz != 96) return (FALSE); \
if (elf_tdata(abfd)->core_signal == 0) \
elf_tdata (abfd)->core_signal = ((int *)(note->descdata))[5]; \
elf_tdata (abfd)->core_pid = ((int *)(note->descdata))[6]; \
/* Make a ".reg/999" section. */ \
return _bfd_elfcore_make_pseudosection (abfd, ".reg",raw_size, \
note->descpos + offset); \
}' >> ${.TARGET}
echo '#include "elf32-arm.h"' >> ${.TARGET}