Porting Libretro to Other Platforms

There has already been a discussion on how to port emulators to Libretro. However, I wonder about the 2nd part: what is the process of actually porting Libretro (unofficially) to new platforms? Libretro has not officially been ported to the Ouya nor the Raspberry Pi, but but others managed to port to those platforms.

Also, how would the target platform need to handle C++? How would an SDK of the target platform get involved, if at all?

libretro is just an interface, it does not need to be ported. What you need is to port a frontend (e.g. RetroArch) and compile a core for that platform.

Oops. Excuse me. ‘Libretro’ and ‘RetroArch’ seem to be used interchangeably despite their differences, which means that I got confused.

I mean to say ‘How do I port RetroArch to a new platform?’

To port RetroArch to a new platform you need to ensure you have working graphics, audio and input drivers. If the platform can use OpenGL you need to implement windowing and context code.

Then you might need some frontend glue. Especially mobile platforms have irregular ways of running and starting applications (no obvious main() function for example).

The last (but simplest) is to have some build system for that platform, usually a simple Makefile.platform is good enough.