From owner-freebsd-alpha Sun Sep 5 20:39: 9 1999 Delivered-To: freebsd-alpha@freebsd.org Received: from laurasia.com.au (lauras.lnk.telstra.net [139.130.93.142]) by hub.freebsd.org (Postfix) with ESMTP id CEFBB15444 for ; Sun, 5 Sep 1999 20:39:00 -0700 (PDT) (envelope-from mike@laurasia.com.au) Received: (from mike@localhost) by laurasia.com.au (8.9.3/8.9.3) id LAA94307; Mon, 6 Sep 1999 11:38:08 +0800 (WST) (envelope-from mike) From: Michael Kennett Message-Id: <199909060338.LAA94307@laurasia.com.au> Subject: Re: Changes to binutils (--target=alpha-freebsd) In-Reply-To: <199909060221.UAA01375@harmony.village.org> from Warner Losh at "Sep 5, 1999 08:21:02 pm" To: imp@village.org (Warner Losh) Date: Mon, 6 Sep 1999 11:38:07 +0800 (WST) Cc: alpha@freebsd.org X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-alpha@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org Hello Warner, > In message <199909040942.RAA26591@laurasia.com.au> Michael Kennett writes: > : It is the file mkstemp.o. I've added it to the Makefile /usr/src/gnu/usr.bin/ > : cc/cc_drv/Makefile (in the line SRCS). > > I've never needed to do this. I think that you must have an old > system... We went through this several months ago. > > I only intend to support cross compiling on a system that is installed > from a -current system that matches what you are cross compiling. > That is if you haven't done a make world before trying to make a cross > world, then all bets are off. I've cvsup'd the latest sources almost weekly, and not had problems doing a native (x86) build. I don't have FreeBSD installed on the alpha, as I don't have the binaries for it (I know it is possible to download the binaries, but that's just not nearly as much fun as building from source :-) I also got my network usage report today, and I can't afford to download the binaries :-( I've been using the 'standard-supfile', (modified to suck from cvsup.au. freebsd.org), with the source collection 'src-all' -- so I should be getting the source changes for contrib as well. I think I'm getting current, as the '*default release=cvs tag=.' line is present as well. i.e. the relevant lines in my supfile are: *default host=cvsup.au.freebsd.org *default release=cvs tag=. src-all The tag on the Makefile in /usr/src/gnu/usr.bin/cc/cc_drv is $FreeBSD: src/gnu/usr.bin/cc/cc_drv/Makefile,v 1.4 1998/08/27 23:35:15 .... $ This makefile does not include 'mkstemp.c' in the SRCS variable. > > : Hidden in the bowels of the FreeBSD source tree (/usr/src/gnu/usr.bin/binutils/ > : libbfd/alpha) is the file 'bfd.h', which configures the characteristics of the > : host architecture. In this file is the line > : > : #define BFD_HOST_64BIT_LONG 1 > : > : i.e. It is saying that a (native) alpha compiler has 64-bit registers. By > : changing this line to > : > : #define BFD_HOST_64BIT_LONG 0 > : > : the cross-compilation from the x86 architecture passes binutils without any > : warnings. > > This needs to be fixed so that the right things happens. I suspect > that this is due to mixing the HOST and the TARGET variables in the > same file... Sorry 'bout the ungracious hack on bfd.h -- I'd never recommend such a change. I'm still very much in the exploration phase, and trying to identify where changes need to be made. I think you're suspicion is correct - I've hacked the Makefile in /usr/src/gnu/usr.bin/cc/cc_tools: 131a132,133 >GCC_HOST?= `uname -m` > 134c136 < echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET} --- > echo '#include "${GCC_HOST}/xm-${GCC_HOST}.h"' >> ${.TARGET} The compilation progresses further, but later falls over when the cross- compiler is being used. > > Warner > Regards, Mike To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message