Forum Discussion
Altera_Forum
Honored Contributor
21 years agoCross compiling
Hi folks Have any of you tried cross compiling for the uCLinux on a NIOS2 trough cygwin ??? I am trying to crosscompile the Osip framework which has lots and lots of makefiles that are create...
Altera_Forum
Honored Contributor
21 years agoHi Michael,
> Me too ... shoot me an email ... we can share notes :-) No need ... builds fine. Here's how: 1. edit scripts/config.sub Add an entry for nios2 for the basic_machine variable. All you need is "nios2" in there ;-) 2. setup cppflags & ldflags for the configure script $ export CPPFLAGS=-I$UCLIBC_PLUGIN/include $ export LDFLAGS=-L$UCLIBC_PLUGIN/lib 3. create your build directory (optional) Create a separate build directory ... this will make things easy if you fat finger your configuration options (or decide to change things later) since you can just blow away the entire directory without touching the actual sources. $ mkdir build 4. configure the build This assumes you have a directory structure that looks like this: <TOP> ..| ..+-- libosip2-2.2.0 ..+-- build $ cd build $ ../libosip2-2.2.0/configure --host=nios2-elf This will setup all the makefiles, etc. you need to build the libraries. After the configuration is complete, the exported CPPFLAGS and LDFLAGS are no longer needed. 5. build the libraries In the build directory: $ make That's all. You may want to make install, but if not the libraries can be found here: build/src/osip2/.libs/libosip2.a build/src/osipparser2/.libs/libosipparser2.a And you'll need the osip2 and osipparser2 header directories from the libosip include tree. Regards, --Scott