How to compile GD on a 32 bit linux system?

I was wondering if it is possible to compile the GD on a 32 -bit system ( ubuntu ) is necesssary download and compile something extra or is it just as you compile a 32- bit common program?
ps: sorry if I am posting in the wrong place , I’m new here.
Why not use a 64 bits linux instead ?

Maybe he has old cpu that only support 32bits? Or <=4GB of Ram (unless you have more than 4GB, no need to bother with 64bit system).