From owner-freebsd-current Tue Jul 6 22: 2:29 1999 Delivered-To: freebsd-current@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id D643D14CA4 for ; Tue, 6 Jul 1999 22:02:21 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id XAA24244 for ; Tue, 6 Jul 1999 23:02:20 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id XAA67516 for ; Tue, 6 Jul 1999 23:00:49 -0600 (MDT) Message-Id: <199907070500.XAA67516@harmony.village.org> To: current@freebsd.org Subject: How to cross build Date: Tue, 06 Jul 1999 23:00:48 -0600 From: Warner Losh Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG OK. Per many requests from the community, I've committed my cross compilation changes. To build you just say make buildworld TARGET=hpcmips TARGET_ARCH=mipsel or make buildworld TARGET=m68k TARGET_ARCH=m68k Right now you must specify both TARGET and TARGET_ARCH. You will want to do this with a clean /usr/obj. Please send comments to me. The one time I tried it, I was unable to build alpha binaries on i386 due to bugs in the gnu tools. That was before egcs, however. Building i386 binaries on the alpha may work, but I don't have access to my Alpha lately to try. This is a work in progress. Since I've been using this on MIPS, whose kernel includes aren't yet complete enough for make world, I don't know if it will work completely or not. The goal is to have a buildworld complete and then do an installworld in the native environment, or with a DESTDIR=xxxx to put the files in, say, an NFS mounted root partition. I did try to make this work with by redefining BINFORMAT, but I found too many problems with doing this because cc1 isn't dependent on BINFORMAT. It was easier to build explicit cross tools to make this happen. I've been using the cross binaries for a variety of purposes, so I have good confidence in at least that part of the commit. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message