[LLVMdev] 2.1 Pre-Release Available (testers needed)

Chandler Carruth chandlerc at gmail.com
Wed Sep 19 07:43:48 PDT 2007


Chris Lattner wrote:
> 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:

I was the one that helped Emil Mikulic work this patch up. As far as I
could tell while hacking around this isn't a workaround. It is a patch
to use the existing program-prefix functionality in the GCC makefile.
There was only one variable that didn't utilize the program prefix in
building the executable name, and I hooked it into the existing mechanisms.

> 
> 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.

I'm hoping these are orthogonal -- program-prefix providing one level of
protection, and path-shifting the install providing another.

> If your patch eliminates the need for this and doesn't break anything
> else, I'd love to see it in llvm 2.2.

Let me know if there is any breakage, and I will be happy to prod it, as
I worked up the patch. I feel bad shoving that off on someone else.

-Chandler



More information about the llvm-dev mailing list