On Sep 18, 2007, at 9:28 PM, Erick Tryzelaar wrote:> Tanya Lattner wrote: >> LLVMers, >> >> The 2.1 pre-release (version 1) is available for testing: >> http://llvm.org/prereleases/2.1/version1/ > > A couple months ago, I had a problem packaging llvm-gcc for macports > because one of the binaries from llvm-gcc was somehow getting used by > Apple's gcc driver instead of the native one. This was causing some > subtle bugs for people. Anyway, someone, I don't remember who, > helped me > out with this patch: > > --- ../llvm-gcc4-2.0.source/gcc/Makefile.in.old 2007-08-08 > 21:09:17.000000000 -0700 > +++ ../llvm-gcc4-2.0.source/gcc/Makefile.in 2007-08-08 > 21:09:39.000000000 -0700 > @@ -3658,7 +3658,7 @@ > -$(INSTALL_PROGRAM) xgcc$(exeext) > $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) > -rm -f $(DESTDIR)$(bindir)/$(GCC_TARGET_INSTALL_NAME)-$ > (version) > -( cd $(DESTDIR)$(bindir) && \ > - $(LN) $(GCC_INSTALL_NAME)$(exeext) > $(target_noncanonical)-gcc-$(version) ) > + $(LN) $(GCC_INSTALL_NAME)$(exeext) > $(GCC_TARGET_INSTALL_NAME)-$(version) ) > -if [ -f gcc-cross$(exeext) ] ; then \ > if [ -d $(DESTDIR)$(gcc_tooldir)/bin/. ] ; then \ > rm -f $(DESTDIR)$(gcc_tooldir)/bin/gcc$(exeext); \ > > This just lets you put the configure-specified prefix llvm- in > front of > the binary, and subquently doesn't cause problem's with apple's gcc. I > just checked out the latest llvm-gcc binaries, but it doesn't yet have > this patch in place. Is it too late to get this into the release? If > not, it won't take too much effort to just migrate the 2.0 patch to > 2.1. >You can set the program-prefix to be "llvm-". We actually recommend this and its in the README.llvm. We do not require it though. -Tanya> If it helps, it looks like Reid added this code in revision 40137. > > Thanks, > > -e > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Erick Tryzelaar
2007-Sep-19 05:14 UTC
[LLVMdev] 2.1 Pre-Release Available (testers needed)
Tanya Lattner wrote:> You can set the program-prefix to be "llvm-". We actually recommend > this and its in the README.llvm. We do not require it though. > > -Tanya >Hello Tanya. Yes, I'm aware of this, but one of the programs that got installed for me, like i686-apple-darwin8.10.1-gcc-4.0.1, was not getting the program prefix, and was getting used by gcc. This patch changed it so that this executable is named i686-apple-darwin8.10.1-llvm-gcc-4.0.1.
On Tue, Sep 18, 2007 at 10:14:29PM -0700, Tanya Lattner wrote:> You can set the program-prefix to be "llvm-". We actually recommend > this and its in the README.llvm. We do not require it though.I meant to bring this up: llvm-gcc4.0-2.1.source/README.LLVM makes no mention of passing --program-prefix=llvm- to configure. ISTR Reid suggesting this option to me a long time ago. --Emil
On Sep 18, 2007, at 10:14 PM, Emil Mikulic wrote:> On Tue, Sep 18, 2007 at 10:14:29PM -0700, Tanya Lattner wrote: >> You can set the program-prefix to be "llvm-". We actually recommend >> this and its in the README.llvm. We do not require it though. > > I meant to bring this up: > > llvm-gcc4.0-2.1.source/README.LLVM makes no mention of > passing --program-prefix=llvm- to configure. >Well, it does in trunk. I just forgot to merge it over. Thanks for the reminder ;) http://llvm.org/viewvc/llvm-project/llvm-gcc-4.0/trunk/README.LLVM? revision=41976&view=markup -Tanya> ISTR Reid suggesting this option to me a long time ago. > > --Emil > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
On Sep 18, 2007, at 10:14 PM, Erick Tryzelaar wrote:> Tanya Lattner wrote: >> You can set the program-prefix to be "llvm-". We actually recommend >> this and its in the README.llvm. We do not require it though. >> >> -Tanya >> > > Hello Tanya. Yes, I'm aware of this, but one of the programs that got > installed for me, like i686-apple-darwin8.10.1-gcc-4.0.1, was not > getting the program prefix, and was getting used by gcc. This patch > changed it so that this executable is named > i686-apple-darwin8.10.1-llvm-gcc-4.0.1.I'm not qualified in GCC makefile hackery enough to say whether this is a good patch or not, but some "workaround" food for thought: The way I have made this work is a gross hack, but is quite effective. Basically, instead of installing llvm-gcc with a prefix of /usr/local (for example), I install it with a prefix of /usr/local/ llvm-gcc. This ensures that we get binaries in /usr/local/llvm-gcc/ bin, which should not be added to your $PATH. Since they aren't in your path, the system GCC doesn't pick them up. To get llvm-gcc into my path, I then add symlinks from /usr/local/bin/ llvm-gcc to /usr/local/llvm-gcc/bin/llvm-gcc (likewise g++). This adds the driver to the path but not the subtools. This works like a charm for me (though it is gross and hackish). If your patch eliminates the need for this and doesn't break anything else, I'd love to see it in llvm 2.2. One of our plans for 2.1 that I hope will work out is to provide a "universal" binary for the mac instead of separate ppc and x86 tarballs. This will run on either ppc or intel machines and will fully support the Apple-style -arch options. Since it's a binary tarball, we'll encapsulate all the nastiness above so users just have to untar it somewhere and add one directory to their path. -Chris
Apparently Analagous Threads
- [LLVMdev] 2.1 Pre-Release Available (testers needed)
- [LLVMdev] 2.1 Pre-Release Available (testers needed)
- [LLVMdev] 2.1 Pre-Release Available (testers needed)
- [LLVMdev] 2.1 Pre-Release Available (testers needed)
- [LLVMdev] 2.1 Pre-Release Available (testers needed)