Can I cross compile with gcc for an old version of a Linux distro on my Ubuntu 9.10?

Posted by Johan on Stack Overflow See other posts from Stack Overflow or by Johan
Published on 2010-04-28T21:11:28Z Indexed on 2010/04/28 21:17 UTC
Read the original article Hit count: 285

Filed under:
|
|

Hi,

I have some old hardware with an old version of say SuSE linux running on it. Now I have this fancy development machine running Ubuntu 9.10. Some of the tools I use to compile my C app (written in Python 2.6.x) are not available on the old SuSe box. So... is it possible to compile for that old machine on my dev box?

I have the following steps in mind, but would like to cross-check before venturing off into this quest: 1. Find out which static/shared libs my app needs and find/build target version of them 2. Also find the corresponding header files 3. Feed the correct flags to gcc to use the target headers and libraries 4. Feed the correct flags to gcc to use the correct architecture (i386/i686), or do I need a cross-compilation toolchain. 5. Compile, upload and enjoy ;-)

I regularly use avr-gcc and cc65, both are cross compiling. I know that you set up a coss compiler for developing something like a gumstix, so it should be possible to do the same for old/other Linux distros, not?

C

© Stack Overflow or respective owner

Related posts about c

    Related posts about cross-compiling