You can still use C on 6502, it's just not very fast.
I guess you could define another language that mostly looks like C, but built around particular CPU architecture quirks.
https://www.youtube.com/watch?v=LnzuMJLZRdU&list=PLowKtXNTBy...
A compiler/linker combo for the 6502 should, for example, analyse the call graph of the entire program to figure out what return addresses it needs to store on the stack at all (alternative 1: store it at a forced address in main memory (will work in single-threaded code that isn’t recursive). Alternative 2: instead of RTS, jump back to the caller (will work for functions that get called from only one place. Aggressively inlining those is an alternative, but may turn short branches into long ones, with their own problems)
Similarly, a compiler/linker for the 6502 probably should try really hard to move function arguments to fixed addresses, and to reuse such memory between different functions (if foo isn’t (indirectly) recursive and doesn’t (indirectly) call bar and vice versa, their function arguments can share memory)
And yes, self-hosting such a compiler would be even more challenging, given the 64kB memory limit.