Date: Fri, 30 Jan 1998 07:39:42 -0500 From: dmaddox@scsn.net (Donald J. Maddox) To: Ryszard Czekaj <rycho@demo.pl> Cc: Questions <freebsd-questions@FreeBSD.ORG> Subject: Re: Compiling Linux Source -> Linux Binary on FreeBSD Message-ID: <19980130073942.48788@scsn.net> In-Reply-To: <Pine.BSF.3.96.980130130808.19919C-100000@rokita.demo.pl>; from Ryszard Czekaj on Fri, Jan 30, 1998 at 01:09:59PM %2B0100 References: <19980130070253.54234@scsn.net> <Pine.BSF.3.96.980130130808.19919C-100000@rokita.demo.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980130073942.48788>
