in principle, there is also a toolchain for native compilation on the router using built in libraries: http://wl500g.info/showpost.php?p=75208&postcount=11

However, there is no howto.