Date: Thu, 10 Aug 2006 23:47:35 -0700 From: David Sharp <daimon@dev-random.org> To: freebsd-arm@freebsd.org Subject: make kernel-toolchain failure + patch Message-ID: <20060811064735.GA1829@mail.secure.net>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060811064735.GA1829>