From owner-freebsd-emulation Tue Feb 22 10:35:57 2000 Delivered-To: freebsd-emulation@freebsd.org Received: from goliath.siemens.de (goliath.siemens.de [194.138.37.131]) by hub.freebsd.org (Postfix) with ESMTP id A8E9937B72D for ; Tue, 22 Feb 2000 10:35:53 -0800 (PST) (envelope-from andre.albsmeier@mchp.siemens.de) X-Envelope-Sender-Is: andre.albsmeier@mchp.siemens.de (at relayer goliath.siemens.de) Received: from mail1.siemens.de (mail1.siemens.de [139.23.33.14]) by goliath.siemens.de (8.9.3/8.9.3) with ESMTP id TAA10939 for ; Tue, 22 Feb 2000 19:35:48 +0100 (MET) Received: from curry.mchp.siemens.de (curry.mchp.siemens.de [139.25.42.7]) by mail1.siemens.de (8.9.3/8.9.3) with ESMTP id TAA04866 for ; Tue, 22 Feb 2000 19:35:48 +0100 (MET) Received: (from daemon@localhost) by curry.mchp.siemens.de (8.9.3/8.9.3) id TAA31600 for ; Tue, 22 Feb 2000 19:35:48 +0100 (CET) Date: Tue, 22 Feb 2000 19:35:45 +0100 From: Andre Albsmeier To: Marcel Moolenaar Cc: Andre Albsmeier , freebsd-emulation@FreeBSD.ORG Subject: Re: How to link a Linux program under FreeBSD ? Message-ID: <20000222193545.A45196@internal> References: <20000221214203.A72944@internal> <38B2D26B.8E280F5C@cup.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: <38B2D26B.8E280F5C@cup.hp.com>; from marcel@cup.hp.com on Tue, Feb 22, 2000 at 06:16:11PM +0000 Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Tue, 22-Feb-2000 at 18:16:11 +0000, Marcel Moolenaar wrote: > Andre Albsmeier wrote: > > > > I have linux_base and linux_devel installed on STABLE-3.4 > > Now let's assume I have the following object files: > > > > main.o obj1.o obj2.o > > Let's also assume that these objects are Linux-objects... Sure, sorry, I forgot to mention that explicitely... > > > How can I link these together so that a Linux binary is produced? > > Of course, I also want the Linux statup code and the linux libc... > > The easiest way is to run a Linux shell (ie /compat/linux/bin/bash). > Within that shell you just type something like: > > cc -o whatyatalkaboutwillis main.o obj1.o obj2.o > > Rule of thumb: From within a Linux shell you always pick up the linux > binaries and not the FreeBSD native ones. Yes, thanks for the hint. I have also been told that I can put /compat/linux/bin and /compat/linux/usr/bin first in my PATH. I tried it and it works as well. I assume that this works also for the libs and the crt1 stuff. I think, the only problem arises if, e.g. I specify some lib that doesn't exist under /compat/linux but under FreeBSD. In this case I assume that the FreeBSD lib is being used. Thanks again, -Andre > > -- > Marcel Moolenaar > mail: marcel@cup.hp.com / marcel@FreeBSD.org > tel: (408) 447-4222 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message