From owner-freebsd-questions Fri Jan 30 04:40:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id EAA21791 for questions-outgoing; Fri, 30 Jan 1998 04:40:23 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.scsn.net (scsn.net [206.25.246.12]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id EAA21750 for ; Fri, 30 Jan 1998 04:40:18 -0800 (PST) (envelope-from dmaddox@scsn.net) Received: from rhiannon.scsn.net ([208.133.153.63]) by mail.scsn.net (Post.Office MTA v3.1.2 release (PO205-101c) ID# 0-41950U6000L1100S0) with ESMTP id AAA185; Fri, 30 Jan 1998 07:38:23 -0500 Received: (from root@localhost) by rhiannon.scsn.net (8.8.8/8.8.7) id HAA00773; Fri, 30 Jan 1998 07:39:43 -0500 (EST) (envelope-from root) Message-ID: <19980130073942.48788@scsn.net> Date: Fri, 30 Jan 1998 07:39:42 -0500 From: dmaddox@scsn.net (Donald J. Maddox) To: Ryszard Czekaj Cc: Questions Subject: Re: Compiling Linux Source -> Linux Binary on FreeBSD Reply-To: dmaddox@scsn.net Mail-Followup-To: Ryszard Czekaj , Questions References: <19980130070253.54234@scsn.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89i In-Reply-To: ; from Ryszard Czekaj on Fri, Jan 30, 1998 at 01:09:59PM +0100 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG X-To-Unsubscribe: mail to majordomo@FreeBSD.org "unsubscribe questions" On Fri, Jan 30, 1998 at 01:09:59PM +0100, Ryszard Czekaj wrote: > On Fri, 30 Jan 1998, Donald J. Maddox wrote: > > > On Thu, Jan 29, 1998 at 09:37:45PM -0800, Doug White wrote: > > > On Thu, 29 Jan 1998, KrOnUs wrote: > > > > > > > > > > > Hi all.. > > > > > > > > Is it possible to compile linux source code into a linux binary > > > > so that it will run under the linux emulator under FreeBSD? > > > > > > > > I presume I've have to rip the include's etc. off of an existing linux box > > > > and transfer them over to the BSD box but is there an easy way to do this? > > > > (i.e making gcc look at the linux includes instead of the native > > > > includes). > > > > > > What? > > > > > > AFAIK there are no Linux cross-compilers for FreeBSD. Just build the > > > desired bits on the linux machine, copy over to the FreeBSD machine, load > > > the linuxulator, run brandelf -t Linux binary if you need to, and have > > > fun. > > > > This is what the linux_devel port is for. I build Linux binaries all the > > time on FreeBSD. > > > > What syntax is for compiling with intalled linux_devel port? No special syntax required: 1) Install the linux_lib port. 2) Install the linux_devel port. 3) When you want to produce a Linux binary, just change your $PATH so that /compat/linux/usr/bin comes before /usr/bin, so the Linux gcc, etc. is used instead of the FBSD tools. The result of 'make' will then be Linux-ELF binaries.