32-bit compiles failing on 64-bit platform - Linux

This is a discussion on 32-bit compiles failing on 64-bit platform - Linux ; I am trying to create some 32-bit utilities on a 64-bit platform
(Ubuntu Edgy), using a somewhat old gcc release.
My problem is that the linker is choosing the incorrect libraries at
linking (particularly, the incorrect glib crti.o/crtn.o libraries which
...

32-bit compiles failing on 64-bit platform

I am trying to create some 32-bit utilities on a 64-bit platform
(Ubuntu Edgy), using a somewhat old gcc release.

My problem is that the linker is choosing the incorrect libraries at
linking (particularly, the incorrect glib crti.o/crtn.o libraries which
generate a segfault when linked against).
As a matter of fact, I am very puzzled about how the linker gets to
choose the libraries in the first place (any documentation about how
/etc/ld.so.conf, /etc/ld.so.cache and so forth interact is
appreciated), as it automatically adds some paths I never specified.