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-boun...@yoctoproject.org [yocto-boun...@yoctoproject.org] on behalf 
of yocto-requ...@yoctoproject.org [yocto-requ...@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-requ...@yoctoproject.org

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

When replying, please edit your Subject line so it is more specific
than "Re: Contents of yocto digest..."
--- Begin Message ---
-e 
A release candidate build for yocto-1.8_M1.rc1 is now available at:

 
http://autobuilder.yoctoproject.org/pub/releases/yocto-1.8_M1.rc1


Please begin QA on this build as soon as possible.


Build hash information: 
meta-intel : a72da6350e7a77256ad597e8e8c40909590a2a40 
meta-fsl-arm : a593ac48d1a13067d3e4000be616e34699ea4732 
meta-minnow : 13a5f2ab84c7284647a3e067a33109c11dae0568 
meta-qt3 : 3016129d90b7ac8517a5227d819f10ad417b5b45 
meta-fsl-ppc : 486a72425f2f6e25efd9bfdbb9638fb58e90a85f 
poky : b813bdebb36501500e86fea5f7e15b4b15ea0902 


This is an automated message from
The Yocto Project Autobuilder
Git: git://git.yoctoproject.org/yocto-autobuilder
Email: elizabeth.flana...@intel.com 


--- End Message ---
--- Begin Message ---
Hi guys,

Before I go to my errors let me outline the steps I took.

I started off with the LLVM recipe that I got from 
http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-core/llvm . 
Then I added the following to llvm.inc's do_configure_prepend() because I 
wanted to compile Clang, rt-compiler and Clang tools together with LLVM. I also 
added the SRC_URI and Licensing for all of them but I don't think that's the 
main issue here:

mv ${WORKDIR}/cfe-${PV}.src ${S}/tools/clang
mv ${WORKDIR}/compiler-rt-${PV}.src ${S}/projects/compiler-rt
mv ${WORKDIR}/clang-tools-extra-${PV}.src ${S}/tools/clang/extra

The three lines copies the extracted files to the source directory because 
that's the way the LLVM does it according to 
http://clang.llvm.org/get_started.html .

The compilation went well but I got "Files/directories were installed but not 
shipped error".  The log is at http://pastebin.com/e831Ex9E .

I then tried to add the install -d ${D}${libdir}/clang to do_install() function 
but no good..hence my reason of posting here to have more eyes looking at this.

Let me know if you need more info.

Thanks,
Chan Kit

--- End Message ---
--- Begin Message ---
Hi Ulf,

On Sunday 07 December 2014 12:22:06 Ulf Winberg wrote:
> I'm struggling with trying to dynamically set a file name, to be used with
> "require". See code below:
> 
> python () {
>        TA = d.getVar('TARGET_ARCH', True)
>        if TA == "arm":
>                javaPkg = "oracle-jse-ejre-arm-vfp-hflt-client-headless"
>        elif TA == "i586":
>                javaPkg = "oracle-jse-jre-i586"
>        elif TA == "x86_64":
>                javaPkg = "oracle-jse-jre-x86-64"
>        else:
>                raise Exception("Target architecture '%s' is not supported
> by the meta-oracle-java layer" %TA)
>        d.setVar('JAVA_PKG', javaPkg)
> }
> 
> require ${JAVA_PKG}.inc
> 
> The python function executes properly (if I print javaPkg, it shows up
> correctly) but the "JAVA_PKG" variable does not become available for
> "require". From what I can read in section 3.4.4 in this link
> <http://www.yoctoproject.org/docs/1.6/bitbake-user-manual/bitbake-user-manua
> l.html>, it seems to me it should work. Could someone please explain to me
> why it doesn't?

I'm pretty sure this is because anonymous functions don't get executed until 
finalize() is called, which is towards the end of parsing; the "require" 
statement must be handled immediately. Try this instead:

---------------- snip ----------------

def get_java_package(d):
    TA = d.getVar('TARGET_ARCH', True)
    if TA == "arm":
        javaPkg = "oracle-jse-ejre-arm-vfp-hflt-client-headless"
    elif TA == "i586":
        javaPkg = "oracle-jse-jre-i586"
    elif TA == "x86_64":
        javaPkg = "oracle-jse-jre-x86-64"
    else:
        raise bb.parse.SkipPackage("Target architecture '%s' is not supported 
by the meta-oracle-java layer" % TA)
    return javaPkg

JAVA_PKG = "${@get_java_package(d)}"

require ${JAVA_PKG}.inc

---------------- snip ----------------

The question is though, do you really need a separate inc file for each 
architecture? You can use overrides for this sort of thing e.g.:

---------------- snip ----------------

SOMEVAR = "default value"
SOMEVAR_arm = "value if arm"
SOMEVAR_x86-64 = "value if x86-64"

---------------- snip ----------------

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


--- End Message ---
--- Begin Message ---
I recommend you to file a bug here https://bugzilla.yoctoproject.org/ if
not done already. You may get a proper answer on armhf support there. From
what I see, (someone please correct me if I am wrong), there is no prelink
dynamic link armhf patch. You can also create and submit the patch for
review. AFAIK, you are gonna need to something like below,

.dynamic_linker = "/lib/ld-linux-armhf.so.3"  in arch-arm.c.

This is not tested though. Please do a test yourselves.

-JC

On Mon, Dec 8, 2014 at 1:52 PM, Qiang Yu <yuq...@gmail.com> wrote:

> Thanks for your reply. I almost give up.
>
> You mean that current yocto build doesn't support hard float ABI prelink,
> and the prelink source code needs to
> be modified to use ld-linux-armhf.so.3?
>
> So this problem affect all armhf build of yocto, in other words prelink
> doesn't work for yocto armhf at all now?
>
> Regards,
> Qiang
>
> On Mon, Dec 8, 2014 at 3:28 PM, Jegan Chandru <pcje...@gmail.com> wrote:
>
>> Hi,
>>
>> I think it has to do with the ld-linux-armhf.so.3. May be you should
>> tell prelink that you have hard float ARM ABI to prelink for, than
>> ld-linux.so.3 . It means you need to add ld-linux-armhf.so.3 as a dynamic
>> linker.
>> You should patch the prelink source to get this done.
>>
>> HTH.
>>
>> -JC
>>
>>
>>
>> On Fri, Dec 5, 2014 at 7:41 AM, Qiang Yu <yuq...@gmail.com> wrote:
>>
>>> Hi all,
>>>
>>> I'm building a image with local.conf:
>>> USER_CLASSES ?= "buildstats image-mklibs image-prelink"
>>>
>>> but I think prelink does nothing on my image, because the MD5SUM is the
>>> same before and after
>>> the prelink stage. The mklibs stage is also strange not print anything.
>>> How to make prelink and
>>> mklibs really work?
>>>
>>> Here is the log of log.do_rootfs:
>>>
>>> NOTE: ###### Generate images #######
>>> NOTE: Executing mklibs_optimize_image ...
>>> DEBUG: Executing shell function mklibs_optimize_image
>>> DEBUG: Shell function mklibs_optimize_image finished
>>> NOTE: Executing prelink_image ...
>>> DEBUG: Executing shell function prelink_image
>>> Size before prelinking 49304.
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/fstab-decode: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3
>>> as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/bootlogd: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as
>>> dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/killall5: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as
>>> dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/init.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3
>>> as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/halt.sysvinit: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3
>>> as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/shutdown.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /sbin/runlevel.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/sbin/dropbearmulti: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /bin/mountpoint.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /bin/busybox.suid: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3
>>> as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /bin/busybox.nosuid: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3
>>> as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/utmpdump.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/mesg.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/last.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/opkg-cl: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as
>>> dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/bmw: Using /lib/ld-linux-armhf.so.3, not /lib/ld-linux.so.3 as
>>> dynamic linker
>>> /opt/yocto/rootfs/tmp/sysroots/x86_64-linux/usr/sbin/prelink:
>>> /usr/bin/wall.sysvinit: Using /lib/ld-linux-armhf.so.3, not
>>> /lib/ld-linux.so.3 as dynamic linker
>>> Size after prelinking 49304.
>>> DEBUG: Shell function prelink_image finished
>>>
>>> Regards,
>>> Qiang
>>>
>>>
>>> --
>>> _______________________________________________
>>> yocto mailing list
>>> yocto@yoctoproject.org
>>> https://lists.yoctoproject.org/listinfo/yocto
>>>
>>>
>>
>>
>> --
>> JCP
>>
>
>


-- 
JCP

--- End Message ---
-- 
_______________________________________________
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto

Reply via email to