[LLVMdev] setting up LLVM to *run on* amd64 but *generate code* for alpha

Jean-Daniel Dupas devlists at shadowlab.org
Sat Mar 21 02:57:03 PDT 2009


Le 21 mars 09 à 01:22, Zack Weinberg a écrit :

> On Mon, Mar 16, 2009 at 11:25 AM, Chris Lattner <clattner at apple.com>  
> wrote:
>> Hi Zack, welcome!
>
> I regret to say I'm disappearing again.  I was only looking at LLVM
> for a class project which is now done with, and I'm not really
> interested in compiler development for the fun of it anymore.  I do
> want to respond to some of the things that you (and others) said...
>
>> On Mar 13, 2009, at 5:41 PM, Zack Weinberg wrote:
>>> I'm trying to persuade llvm (svn trunk) to build in a mode where it
>>> *runs on* amd64 but *generates code* for alpha, exclusively.
>
> As a general note, if you're trying to do cross compilation work, it
> is important to be able to set the compiler's *default* target
> architecture.  "Oh, you can just build with support for all targets
> and then stick -arch=foobar on the command line" is not good enough,
> because setting up a cross compilation environment involves mucking
> with a good half-dozen different programs and libraries, none of which
> are configured in the same way -- oh, sure, you *can* hack up all
> their build systems to pass an extra switch to the compiler, but you
> really don't want to have to.

I'm use to build library using the Apple gcc cross compiler (which  
works exactly like that, you have to pass arch for everything) and  
it's not a major issue:

./configure CC="gcc -arch pcc" CXX="g++ -arch pcc"






More information about the llvm-dev mailing list