From owner-freebsd-questions@FreeBSD.ORG Tue Nov 25 20:22:05 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDC0B106564A for ; Tue, 25 Nov 2008 20:22:05 +0000 (UTC) (envelope-from xotazu@cvc.uab.es) Received: from damascus.uab.es (damascus.uab.es [158.109.168.135]) by mx1.freebsd.org (Postfix) with ESMTP id 786338FC17 for ; Tue, 25 Nov 2008 20:22:05 +0000 (UTC) (envelope-from xotazu@cvc.uab.es) Received: from damascus.uab.es ([127.0.0.1]) by damascus.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with ESMTP id <0KAW00KNGOK2UO30@damascus.uab.es> for freebsd-questions@freebsd.org; Tue, 25 Nov 2008 21:21:38 +0100 (CET) Received: from cvc.uab.es ([158.109.4.2]) by damascus.uab.es (Sun Java System Messaging Server 6.1 HotFix 0.10 (built Jan 6 2005)) with SMTP id <0KAW00KUTOK2U830@damascus.uab.es> for freebsd-questions@freebsd.org; Tue, 25 Nov 2008 21:21:38 +0100 (CET) Received: from cvc131.uab.es by cvc.uab.es (SMI-8.6/SMI-SVR4) id VAA11966; Tue, 25 Nov 2008 21:15:48 +0100 Date: Tue, 25 Nov 2008 21:22:13 +0100 From: Xavier Otazu In-reply-to: <44ej0z4lo4.fsf@be-well.ilk.org> To: freebsd-questions@freebsd.org Message-id: <20081125212213.6fd1dcc1@cvc131.uab.es> Organization: CVC MIME-version: 1.0 X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd7.0) Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7BIT References: <20081121120023.D64301065720@hub.freebsd.org> <"20081124181923.25e 8c7db"@cvc131.uab.es> <44ej0z4lo4.fsf@be-well.ilk.org> Subject: Re: gcc cross-compiler for linux X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Nov 2008 20:22:05 -0000 Lowell, Thanks a lot for this link. Now I see that I need to use the cross-gcc compiler. I am using Matlab inside the linux emulator, and I nedd to create some "mex" files from matlab. In order to create these mes files, matlab needs access to a gcc compiler that produces linux elf files. I think I cannot use the gentoo-stage3 port, because in order to use I would need to chroot and it is not so easy from matlab. Also, when using this compiler I should be able to acces to the "linux"-matlab header files, but if I "chroot" to the gentoo port I won't be able to access them. I tried to install the devel/cross-gcc port, but I get errors when compiling it. I have some doubts about the wiki link you sent me: 1) What really means "null-mount the home directory"? I google-d some info, but I didn't find good information. What really exactly means "corresponding entries in the passwd and shadow files are required then"? 2) What really means "All you have to do is to compile the ports and add includes and libs from the linux system your target in your development"? Do I have to include the linux headers during devel/cross-gcc port building? Or do I have to include them when cross-compiling my code? What options do I have to use when building the linux gcc cross-compiler? I use make TGTARCH=i386 TGTABI=linux install clean Thanks a lot for your help Cheers Xavier On Tue, 25 Nov 2008 15:04:27 -0500 Lowell Gilbert wrote: > Xavier Otazu writes: > > > I would like to compile a C++ code to be executed within the linux > > emulator. > > http://wiki.freebsd.org/linux-xdev > > -- > Lowell Gilbert, embedded/networking software engineer, Boston area > http://be-well.ilk.org/~lowell/