> On Tue, 7 Mar 2000, Roland McGrath wrote:
>
> > > I found that if I compile binaries to object files under linux and then
> > > link it under hurd agains its libc everything works OK.
> >
> > It is true that they are both ELF/x86 platforms. But the ABIs are not
> > binary compatible at any level. So compiling sources with Linux header
> > files and then linking on the Hurd is not going to work (any cases that
> > work are just luck, but you cannot expect to do this generally).
> >
> That's true, but my assumption is also true for simple binaries that does
> not use shared libraries...
What I said is precisely true. You can do this only simple binaries that
do not make use of any system ABIs at all.
> I can link binaries with libc. Both Linux and HURD are glibc systems and
> uses same linb and same (or almost equal) header files, so I can link
> against libc too.
You are completely wrong here.
> My question is how should I link binaries that I compile under hurd
> (forget about crosslinking for awhile) against its linc and standard
> libraries?
Use gcc. gcc -v shows the ld commands it runs for you. On the Hurd, you
do not want to use static linking unless you have a very good and
Hurd-specific reason (i.e. I am sure you don't want it).