make kernel-toolchain failure + patch
David Sharp
daimon at dev-random.org
Fri Aug 11 06:48:07 UTC 2006
very recent cvs does not compile. it fails to find elf32-arm-fbsd.c
in gnu/usr.bin/binutils/libbfd because gnu-arm.diff is getting rejected in
that directory. to get it to compile, patch with gnu-arm.diff and
then apply the patch below.
cognet: any chance you could generate another gnu-arm.diff that works for
the most recent cvs?
david.
--- gnu/usr.bin/binutils/libbfd/Makefile.arm.orig Thu Aug 10 09:39:55 2006
+++ gnu/usr.bin/binutils/libbfd/Makefile.arm Thu Aug 10 19:00:51 2006
@@ -1,14 +1,58 @@
# $FreeBSD: src/gnu/usr.bin/binutils/libbfd/Makefile.arm,v 1.3 2006/08/10 16:39:55 obrien Exp $
-DEFAULT_VECTOR= bfd_elf32_littlearm_vec
+.if defined(ARM_BIG_ENDIAN)
+DEFAULT_VECTOR= bfd_elf32_bigarm_vec
+ADDITIONAL_VECTOR= bfd_elf32_littlearm_vec
+.else
+DEFAULT_VECTOR= bfd_elf32_littlearm_vec
+ADDITIONAL_VECTOR= bfd_elf32_bigarm_vec
+.endif
+
+SRCS+= \
+ cpu-arm.c \
+ elf32.c \
+ elf32-arm-fbsd.c \
+ elf32-gen.c \
+ elf32-target.h \
+ elflink.c
+VECS+= ${DEFAULT_VECTOR} \
+ ${ADDITIONAL_VECTOR}
+
+.if ${TARGET_ARCH} == "arm"
+CFLAGS+= -DDEFAULT_VECTOR=${DEFAULT_VECTOR}
+.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; \
+ int offset; \
+ if (note->descsz != 96) \
+ return (FALSE); \
+ offset = 28; \
+ raw_size = 68; \
+ 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}
+
+
+
+
+
+
-SRCS+= cpu-arm.c \
- elf32.c \
- elf32-arm-fbsd.c \
- elf32-gen.c \
- elf32-target.h \
- elfarm-nabi.c \
- elflink.c
-VECS= ${DEFAULT_VECTOR} \
- bfd_elf32_bigarm_vec
More information about the freebsd-arm
mailing list