From owner-freebsd-arm@FreeBSD.ORG Fri Aug 11 06:48:07 2006 Return-Path: X-Original-To: freebsd-arm@freebsd.org Delivered-To: freebsd-arm@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 80F7016A4DA for ; Fri, 11 Aug 2006 06:48:07 +0000 (UTC) (envelope-from daimon@dev-random.org) Received: from sharp.org (sharp.org [161.58.2.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id B084543D49 for ; Fri, 11 Aug 2006 06:48:06 +0000 (GMT) (envelope-from daimon@dev-random.org) Received: from betty.wa.sharp.org (sharp.org [161.58.2.117]) by sharp.org (8.12.11.20060614/8.12.9) with ESMTP id k7B6m2DZ056444 for ; Fri, 11 Aug 2006 00:48:03 -0600 (MDT) Received: from betty.wa.sharp.org (b38b92b66bbe5963cfae9cbb8afce469@localhost [127.0.0.1]) by betty.wa.sharp.org (8.13.6/8.13.3) with ESMTP id k7B6lZ3E002152 for ; Thu, 10 Aug 2006 23:47:36 -0700 (PDT) (envelope-from daimon@dev-random.org) Received: (from djs@localhost) by betty.wa.sharp.org (8.13.6/8.13.6/Submit) id k7B6lZW0002151 for freebsd-arm@freebsd.org; Thu, 10 Aug 2006 23:47:35 -0700 (PDT) (envelope-from daimon@dev-random.org) X-Authentication-Warning: betty.wa.sharp.org: djs set sender to daimon@dev-random.org using -f Date: Thu, 10 Aug 2006 23:47:35 -0700 From: David Sharp To: freebsd-arm@freebsd.org Message-ID: <20060811064735.GA1829@mail.secure.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Subject: make kernel-toolchain failure + patch X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Aug 2006 06:48:07 -0000 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