For the ARM cross compile I have to compile all of the libraries it uses seperatly before using a toolchain to compile the whole project right? If not whats the proper procedure?
Well, no, you just need to use the ARM toolchain to build your stuff. This is basically the same as your ordinary compiler, but instead of using your system's libraries and building for your own processor architecture, it'll build for generic ARM libraries and an ARM processor. You won't be able to run the executable on your own machine, but it will work in an ARM emulator as well as a real ARM device (if done properly).
For the windows compile do I need to recompile all the libraries? Or will it be fine because its using the same cpu architecture?
Yes. Windows and Linux have different libraries and you must recompile. In fact Windows and Linux even have a different ABI for the x86_64 processor, so it's not even really the "same" processor architecture. So yes you will have to compile once for Linux, and once for Windows. In general trying to cut corners by compiling some code and not other code for a new target is bound to cause issues with binary compatibility and library references, so it's best to just recompile everything at once.
That said if you have already built independent parts of your code for a given OS + architecture, you don't need to recompile them again if nothing has changed. You can reuse them, just make sure you track them properly to make sure you are not linking to an outdated or incompatible version of your code,
What will a change in os mean for the work I have to do?
You'll need to:
1. get a cross-compilation toolchain for the new OS.
2. adapt your code to support the OS (moar #ifdef's or using cross-platform libraries)
3. run tests on one more OS
What will a change in cpu architecture mean?
You'll need to:
1. make sure your cross-compiler supports that processor architecture
2. if applicable, take advantage of that processor architecture in your code (if you're not doing inline assembly, you don't need to worry about this)
3. run tests on one more processor architecture
Note this depends on "how different" the new CPU architecture is. If you're just adding support for extra features of a processor you already support, you should be fine and there should not even be a need to recompile anything. But if you are supporting a whole new CPU with different instruction set and everything, then you must start again from scratch with that processor.
Edited by Bacterius, 09 July 2013 - 11:24 PM.
The slowsort algorithm is a perfect illustration of the multiply and surrender paradigm, which is perhaps the single most important paradigm in the development of reluctant algorithms. The basic multiply and surrender strategy consists in replacing the problem at hand by two or more subproblems, each slightly simpler than the original, and continue multiplying subproblems and subsubproblems recursively in this fashion as long as possible. At some point the subproblems will all become so simple that their solution can no longer be postponed, and we will have to surrender. Experience shows that, in most cases, by the time this point is reached the total work will be substantially higher than what could have been wasted by a more direct approach.
- Pessimal Algorithms and Simplexity Analysis