adding new target to configure script

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

adding new target to configure script

Preston Briggs
I'm experimenting with a new backend, hoping to build a cross compiler, and reading "Writing an LLVM Compiler Backend". Early on, in "Preliminaries", it suggests editing my configure script to add my new target to the TARGETS_TO_BUILD variable, suggesting some creativity may be required.

I'm perhaps not creative enough, 'cause I can't get it to work. I tried a couple of variations (one seemed straightforward; in the other, I went through looking for every example of Sparc to see how they did it and making the appropriate changes).

I tried configuring like this

    ./configure --enable-target=preston --disable-optimized --enable-assertions=yes --prefix=/path-to-install

and it chunked along for a while, but ultimately failed, complaining

    configure: error: Unrecognized target preston
    configure: error: ./configure failed for projects/sample

Any ideas?

Thanks,
Preston


_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: adding new target to configure script

Tom Stellard-3
On Wed, Sep 04, 2013 at 02:00:13PM -0700, Preston Briggs wrote:
> I'm experimenting with a new backend, hoping to build a cross compiler, and
> reading "Writing an LLVM Compiler Backend". Early on, in "Preliminaries",
> it suggests editing my configure script to add my new target to the
> TARGETS_TO_BUILD variable, suggesting some creativity may be required.
>

If you configure with --enable-experimental-targets=Preston assuming
that your backend is in lib/Target/Preston and you have updated all the
LLVMBuild.txt files, then you should be able to build your backend
without updating the configure script.

> I'm perhaps not creative enough, 'cause I can't get it to work. I tried a
> couple of variations (one seemed straightforward; in the other, I went
> through looking for every example of Sparc to see how they did it and
> making the appropriate changes).
>
> I tried configuring like this
>
>     ./configure --enable-target=preston --disable-optimized
> --enable-assertions=yes --prefix=/path-to-install
>
> and it chunked along for a while, but ultimately failed, complaining
>
>     configure: error: Unrecognized target preston
>     configure: error: ./configure failed for projects/sample
>

Did you update the configure script in projects/sample ?

-Tom
_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev