[LLVMdev] 2.1 Pre-Release Available (testers needed)
Chris Lattner
sabre at nondot.org
Tue Sep 18 22:36:53 PDT 2007
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
More information about the llvm-dev
mailing list