I need to set up the Git client on a cheap shared hosting, with a no-name 32-bit Linux distribution. GCC isn\'t available so I can\'t compile it on the server. I do have at
OS X isn't going to work - its geared to produce Mach-O binaries with the OS X syscall interface, not Linux ELF binaries.
Using -m32 on the CLFAGS is going to help, but most importantly, use -static as well. Static binaries are much more portable.
If that fails, please provide exactly how it failed.
Your best bet is trying to compile git as a static binary. Your binary probably have different shared libraries versions (or even, not all dependencies installed).
This link:
How to build git for a host with no compiler
Provides information on how to build git as a static binary.
This stackoverflow answer provides information on how to cross compile it from a 64 bit host.
Hope this helps.
Honestly, if it were me, I would just fire up 32-bit Linux in a VM and compile there.