Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Nov 2008 21:22:13 +0100
From:      Xavier Otazu <xotazu@cvc.uab.es>
To:        freebsd-questions@freebsd.org
Subject:   Re: gcc cross-compiler for linux
Message-ID:  <20081125212213.6fd1dcc1@cvc131.uab.es>
In-Reply-To: <44ej0z4lo4.fsf@be-well.ilk.org>
References:  <20081121120023.D64301065720@hub.freebsd.org> <"20081124181923.25e 8c7db"@cvc131.uab.es> <44ej0z4lo4.fsf@be-well.ilk.org>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <freebsd-questions-local@be-well.ilk.org> wrote:

> Xavier Otazu <xotazu@cvc.uab.es> 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/



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20081125212213.6fd1dcc1>