From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id D5A81E0086F; Tue, 9 Dec 2014 08:27:27 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,HTML_MESSAGE autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.0 HTML_MESSAGE BODY: HTML included in message Received: from mx-3.enea.com (sestofw01.enea.se [192.36.1.252]) by yocto-www.yoctoproject.org (Postfix) with SMTP id D904BE0082F for ; Tue, 9 Dec 2014 08:27:18 -0800 (PST) Received: from [192.168.14.95] (192.168.14.95) by smtp.enea.com (172.21.1.209) with Microsoft SMTP Server id 14.3.158.1; Tue, 9 Dec 2014 17:27:13 +0100 Message-ID: <548722E0.3030907@enea.com> Date: Tue, 9 Dec 2014 18:27:12 +0200 From: Liviu Gheorghisan User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: "Yu, Chan KitX" , Jim Rafert , "yocto@yoctoproject.org" References: <86196249137E0843B2E0673D4F731E0C0108E2902F@reactor.sldomain.com> <0E4D391FE2BDEC45AA0B4E32D6BD598A25014B@PGSMSX101.gar.corp.intel.com> In-Reply-To: <0E4D391FE2BDEC45AA0B4E32D6BD598A25014B@PGSMSX101.gar.corp.intel.com> X-Originating-IP: [192.168.14.95] Subject: Re: Building clang with Yocto X-BeenThere: yocto@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Discussion of all things Yocto Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Dec 2014 16:27:27 -0000 Content-Type: multipart/alternative; boundary="------------040508070307020002070803" --------------040508070307020002070803 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Hello Yu, Jim I think you can get the clang executable into the SDK installer script with something like this: 1. Add this dependency in nativesdk-packagegroup-sdk-host.bb: *RDEPENDS_${PN} += "nativesdk-"* 2. In the clang recipe add this install() overwrite for the nativesdk class - this will install it into the SDK sysroot: *do_install_class-nativesdk() { install -d ${D}${bindir} install -m 0755 clang ${D}${bindir} }* 3. The clang recipe (I don't know if it has a recipe of its own, or it's part of the LLVM recipe) should also inherit from nativesdk: *BBCLASSEXTEND = "nativesdk"* Basically this should get your clang executable inside the SDK installer. Sure you can add more executables related to clang (like the llvm-related ones) in the install_class-nativesdk() function. - Liviu Gheorghisan On 12/09/2014 04:36 AM, Yu, Chan KitX wrote: > I **think** I'm just inches away from success. I think I just need to invoke a correct install command somewhere in the do_install function but so far I have not managed to do so. But right now the alternative way of jamming the compiler into the SDK sounds tempting to me. > > -----Original Message----- > From: Yu, Chan KitX > Sent: Tuesday, December 09, 2014 9:19 AM > To: 'Jim Rafert'; yocto@yoctoproject.org > Subject: RE: Building clang with Yocto > > Hi Jim, > > How did you jam the clang compiler into the SDK tarball? > > Chan Kit > > -----Original Message----- > From: Jim Rafert [mailto:jimr@spectralogic.com] > Sent: Tuesday, December 09, 2014 1:48 AM > To: yocto@yoctoproject.org; Yu, Chan KitX > Subject: Building clang with Yocto > > Hello Chan, > > I have been working to a similar goal, to include clang in the toolchain to be used for compiling applications to run on the target. Using clang to compile the OS and kernel are not required or desired by me. > > You may get some insight from the thread I started in November on the subject. I'm not sure that this contains all of the posts on the subject. You may want to search the archive for November. > > I have not been successful yet in getting clang actually packaged in the toolchain, in the Yocto build, but at least it builds. I have a postbuild script that takes the built clang compiler from the work directory and jams it into the SDK tarball that is embedded in the sdk install script. > > -Jim- > > > ________________________________________ > From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of yocto-request@yoctoproject.org [yocto-request@yoctoproject.org] > Sent: Monday, December 08, 2014 2:56 AM > To: yocto@yoctoproject.org > Subject: yocto Digest, Vol 51, Issue 26 > > Send yocto mailing list submissions to > yocto@yoctoproject.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://lists.yoctoproject.org/listinfo/yocto > or, via email, send a message with subject or body 'help' to > yocto-request@yoctoproject.org > > You can reach the person managing the list at > yocto-owner@yoctoproject.org > > When replying, please edit your Subject line so it is more specific than "Re: Contents of yocto digest..." --------------040508070307020002070803 Content-Type: text/html; charset="windows-1252" Content-Transfer-Encoding: 8bit Hello Yu, Jim

I think you can get the clang executable into the SDK installer script with something like this:

1. Add this dependency in nativesdk-packagegroup-sdk-host.bb:
RDEPENDS_${PN} += "nativesdk-<name-of-clang-recipe>"

2. In the clang recipe add this install() overwrite for the nativesdk class - this will install it into the SDK sysroot:
do_install_class-nativesdk() {
    install -d ${D}${bindir}
    install -m 0755 clang ${D}${bindir}
}


3. The clang recipe (I don't know if it has a recipe of its own, or it's part of the LLVM recipe) should also inherit from nativesdk:
BBCLASSEXTEND = "nativesdk"

Basically this should get your clang executable inside the SDK installer. Sure you can add more executables related to clang (like the llvm-related ones) in the install_class-nativesdk() function.

- Liviu Gheorghisan

On 12/09/2014 04:36 AM, Yu, Chan KitX wrote:
I **think** I'm just inches away from success. I think I just need to invoke a correct install command somewhere in the do_install function but so far I have not managed to do so. But right now the alternative way of jamming the compiler into the SDK sounds tempting to me.

-----Original Message-----
From: Yu, Chan KitX 
Sent: Tuesday, December 09, 2014 9:19 AM
To: 'Jim Rafert'; yocto@yoctoproject.org
Subject: RE: Building clang with Yocto

Hi Jim,

How did you jam the clang compiler into the SDK tarball?

Chan Kit

-----Original Message-----
From: Jim Rafert [mailto:jimr@spectralogic.com] 
Sent: Tuesday, December 09, 2014 1:48 AM
To: yocto@yoctoproject.org; Yu, Chan KitX
Subject: Building clang with Yocto

Hello Chan,

I have been working to a similar goal, to include clang in the toolchain to be used for compiling applications to run on the target.  Using clang to compile the OS and kernel are not required or  desired by me.  

You may get some insight from the thread I started in November on the subject.  I'm not sure that this contains all of the posts on the subject. You may want to search the archive for November.

I have not been successful yet in getting clang actually packaged in the toolchain, in the Yocto build,  but at least it builds.  I have a postbuild script that takes the built clang compiler from the work directory and jams it into the SDK tarball that is embedded in the sdk install script.

-Jim-


________________________________________
From: yocto-bounces@yoctoproject.org [yocto-bounces@yoctoproject.org] on behalf of yocto-request@yoctoproject.org [yocto-request@yoctoproject.org]
Sent: Monday, December 08, 2014 2:56 AM
To: yocto@yoctoproject.org
Subject: yocto Digest, Vol 51, Issue 26

Send yocto mailing list submissions to
        yocto@yoctoproject.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.yoctoproject.org/listinfo/yocto
or, via email, send a message with subject or body 'help' to
        yocto-request@yoctoproject.org

You can reach the person managing the list at
        yocto-owner@yoctoproject.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of yocto digest..."

--------------040508070307020002070803--