Are you really looking for specifically GCC or are you really just looking for something free, open source or running on *NIX?
The 51 family, as you refer to it, has an awful lot of branches to it now. There are a lot of manufacturers making 8051 variants all of which are different and may need compile extensions that might not be supported by a generic 8051 compiler. Most vendors have free (or very low cost) development tools now to encourage people to use their devices.
I just did a google for "8051 c compiler free" and got quite a few possibilities.