Microsoft and Sony offer custom compilers to developers to cross-compile code to their consoles. As of now, there are no public compilers that will do it: you need the first-party toolkit. Even if there was a compiler, you probably wouldn't be able to get the code running on the PS4 or the Xbox One because they will only execute signed code, and only Microsoft- and Sony-approved games can be signed and executed on consoles. Registered developers usually have access to special console hardware that will run unsigned code, but consumers don't. These kits are usually a lot more expensive, too.
Some consoles, especially the older ones, have community-supported unofficial SDKs with which you can program games, but they usually have been around for a while, because it takes some time to find a way to defeat code signing protection.