On Tue, Sep 28, 2010 at 12:51 AM, Dale Johannesen <span dir="ltr"><<a href="mailto:dalej@apple.com">dalej@apple.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br>
On Sep 26, 2010, at 3:23 PMPDT, Raghu Prabhakar wrote:<br>
<br>
> 1) During configuration, the default assembler (installed at /usr/ccs/bin) is chosen to be used, but I want to use the GNU assembler (installed at /vm/GNU/bin in my machine). In spite of re-arranging paths on the PATH variable, and even after removing /usr/ccs/bin from PATH, configure still chooses the default assembler itself. Is there any other way I can tell configure to use the GNU assembler ?<br>

<br>
</div>--with-as=pathname<br>
<div><div></div><div class="h5"><br></div></div></blockquote><div>The assembler is chosen by the gcc that you compile clang with. In my case, GCC is configured with </div><div><br></div><div>./configure --prefix=/opt/gcc44 --with-gnu-as --with-as=/usr/sfw/bin/gas --without-gnu-ld --with-ld=/usr/ccs/bin/ld --enable-shared --enable-languages=c,c++</div>
<div><br></div><div>And clang/llvm will be compiled with the as chosen here. </div><div><br></div><div>There is another catch when actually running llvm/clang. clang will try to use the gcc that is installed in the same directory with clang and use that as a hint to find the assembler. So if you install gcc3.4.6 in /usr/local and then install the gcc4.4-compiled Clang in /usr/local, no matter how you tweak $PATH, it will always pick /usr/local/bin/gcc instead of the other gcc4.4. The solution is to install llvm/clang into another location where no gcc can be found, than use $PATH to manipulate the order of discovery for the gcc binary, llvm/clang will than pick up the correct assembler when running.</div>
<div><br></div><div>My 2 cents,</div><div><br></div><div>CW </div></div><br clear="all"><br>-- <br>"If it looks like a duck, walks like a duck, and quacks like a duck, then to the end user it's a duck, and end users have made it pretty clear they want a duck; whether the duck drinks hot chocolate or coffee is irrelevant."<br>