On Tuesday 29 April 2008 14:52:49 David J.A. Koogler wrote:> Everyone, > > I would like to build the LLVM toolchain and the GCC front end as > statically linked executables, but I do not see a configure > option to set this. A quick check of the FAQ and build documents > comes up empty. Is there a linker switch setting or environment > variable for the Makefile? > > Dave Koogler > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdevHi, I think there is a ./configure --enable-static switch - have you tried that? Anders Johnsen
David J.A. Koogler
2008-Apr-29 12:52 UTC
[LLVMdev] How do you Build LLVM Statically Linked?
Everyone, I would like to build the LLVM toolchain and the GCC front end as statically linked executables, but I do not see a configure option to set this. A quick check of the FAQ and build documents comes up empty. Is there a linker switch setting or environment variable for the Makefile? Dave Koogler
David J.A. Koogler wrote:> Everyone, > > I would like to build the LLVM toolchain and the GCC front end as > statically linked executables, but I do not see a configure > option to set this. A quick check of the FAQ and build documents > comes up empty. Is there a linker switch setting or environment > variable for the Makefile? >The --disable-shared option to configure should work (like it does for most configure-scripted projects). Kenneth Boyd
David J.A. Koogler
2008-May-01 02:13 UTC
[LLVMdev] How do you Build LLVM Statically Linked?
Anders Johnsen wrote:> I think there is a > > ./configure --enable-static > > switch - have you tried that?Yes, but that only seems to force building static libraries, not statically linked tools. Kenneth Boyd wrote: > The --disable-shared option to configure should work (like it does for > most configure-scripted projects). No, I tried that and still got dynamically linked tools. It did not work for GCC either. I got the GCC tools statically linked by defining LD_FLAGS on the make invocation: make LD_FLAGS = \"-static\" Searching through the LLVM makefiles, I saw a make variable called LD.Flags but alas trying to set that externally like I did for GCC did not have the desired affect. All of the tools were still linked dynamically. So at least I have statically linked GCC front ends which makes it easier to run the compiler on some of my target processors which do no have dynamic libraries, but I would like to be able to run the whole LLVM suite. Dave Koogler