"Scott Murray" writes: >On Mon, 18 Feb 2002, Jeremy Elson wrote: > >> Hi, >> >> I've succeded (at last) in building an ARM cross compiler on an x86 >> host. However, since I want to share our locally generated compiler >> among a large number of workstations (none of which have the same OS >> installed, of course), I wanted to statically link the compiler >> itself. So, I did a make on binutils with LDFLAGS=-all-static, and >> make on gcc with LDFLAGS=-static. >> >> This successfully generated a statically linked cross-compiler, but >> unfortunately it seems now to only be able to generate static target >> (ARM) binaries. >> >> Is there a way to live in the middle -- of having a cross compiler >> that is statically linked on the host, but that can still generate >> dynamic target binaries? > >Are you configuring gcc with --enable-shared?
I wasn't originally, but just tried recompiling binutils and gcc with this option and it had no effect. I just realized that I left out an important piece of information from my original question: when I compile binutils/gcc *without* the -static flag, I get a dynamically linked cross compiler that *can* also produce dynamically linked target executables. When I turn on -all-static (binutils) and -static (gcc), I get statically linked host binaries, but they also lose their ability to generate dynamic target exes. (At your suggestion, I tried recompiling the toolchain with an explicit --enable-shared; it had no effect). I have a feeling that the -all-static on the binutils is the problem. But, if I compile binutils with just -static (not -all-static), I get a dynamically linked host binary, which is what I'm trying to avoid :-(. Other suggestions appreciated! Best, Jer _______________________________________________ http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm http://www.arm.linux.org.uk/armlinux/mailinglists.php Please visit the above addresses for information on this list.
