Re: [yocto] how to set LICENSE for llvm in .bb file

2014-04-02 Thread Flanagan, Elizabeth
As it's not going into core, I would the license to your layer by
adding a custom license directory to your layer.conf:

# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/custom-licenses"

Place the license in custom-license. I'd name it NCSA-1.0. Then I
would reference that in your .bb file:

LICENSE = "NCSA-1.0 & .. (llvm has a few other licenses iirc)


On Wed, Apr 2, 2014 at 7:16 PM, Guo, Yejun  wrote:
> Hi,
>
> I'm adding package llvm which has its own license: University of 
> Illinois/NCSA Open Source License, see at 
> http://llvm.org/releases/3.4/LICENSE.TXT .  I tried something for LICENSE in 
> .bb file, but is not recognized by the system. Could you please let me know 
> how to set this value? Thanks a lot!
>
>
> Thanks
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



-- 
Elizabeth Flanagan
Yocto Project
Build and Release
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to set LICENSE for llvm in .bb file

2014-04-02 Thread Guo, Yejun
Thanks Elizabeth!


-Original Message-
From: Flanagan, Elizabeth [mailto:elizabeth.flana...@intel.com] 
Sent: Thursday, April 03, 2014 1:16 PM
To: Guo, Yejun
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] how to set LICENSE for llvm in .bb file

As it's not going into core, I would the license to your layer by adding a 
custom license directory to your layer.conf:

# Additional license directories.
LICENSE_PATH += "${LAYERDIR}/custom-licenses"

Place the license in custom-license. I'd name it NCSA-1.0. Then I would 
reference that in your .bb file:

LICENSE = "NCSA-1.0 & .. (llvm has a few other licenses iirc)


On Wed, Apr 2, 2014 at 7:16 PM, Guo, Yejun  wrote:
> Hi,
>
> I'm adding package llvm which has its own license: University of 
> Illinois/NCSA Open Source License, see at 
> http://llvm.org/releases/3.4/LICENSE.TXT .  I tried something for LICENSE in 
> .bb file, but is not recognized by the system. Could you please let me know 
> how to set this value? Thanks a lot!
>
>
> Thanks
>
> --
> ___
> yocto mailing list
> yocto@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto



--
Elizabeth Flanagan
Yocto Project
Build and Release
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to set LICENSE for llvm in .bb file

2014-04-02 Thread Burton, Ross
On 3 April 2014 03:16, Guo, Yejun  wrote:
> I'm adding package llvm which has its own license: University of 
> Illinois/NCSA Open Source License, see at 
> http://llvm.org/releases/3.4/LICENSE.TXT .  I tried something for LICENSE in 
> .bb file, but is not recognized by the system. Could you please let me know 
> how to set this value? Thanks a lot!

LLVM is already packaged outside of oe-core:

http://layers.openembedded.org/layerindex/branch/master/recipes/?q=llvm

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to set LICENSE for llvm in .bb file

2014-04-03 Thread Guo, Yejun
Thank you Ross, what I actually need is llvm+clang, it is a very good reference 
for me to resolve the license issue, and the SYSROOT_PREPROCESS_FUNCS knowledge 
to resolve llvm-config issue.


Thanks
Yejun


-Original Message-
From: Burton, Ross [mailto:ross.bur...@intel.com] 
Sent: Thursday, April 03, 2014 2:01 PM
To: Guo, Yejun
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] how to set LICENSE for llvm in .bb file

On 3 April 2014 03:16, Guo, Yejun  wrote:
> I'm adding package llvm which has its own license: University of 
> Illinois/NCSA Open Source License, see at 
> http://llvm.org/releases/3.4/LICENSE.TXT .  I tried something for LICENSE in 
> .bb file, but is not recognized by the system. Could you please let me know 
> how to set this value? Thanks a lot!

LLVM is already packaged outside of oe-core:

http://layers.openembedded.org/layerindex/branch/master/recipes/?q=llvm

Ross
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to set LICENSE for llvm in .bb file

2014-06-24 Thread Randy MacLeod

On 14-04-03 04:54 AM, Guo, Yejun wrote:

Thank you Ross, what I actually need is llvm+clang, it is a very good reference 
for me to resolve the license issue, and the SYSROOT_PREPROCESS_FUNCS knowledge 
to resolve llvm-config issue.


Thanks
Yejun


Yejun,

Did you ever produce a recipe to build clang?

Are you also trying to build all of YP with it?

A student that worked with me did some work to use
clang to build yocto packages:

http://lists.openembedded.org/pipermail/openembedded-core/2013-November/086275.html

so I'd be interested in hearing about your work.

../Randy





-Original Message-
From: Burton, Ross [mailto:ross.bur...@intel.com]
Sent: Thursday, April 03, 2014 2:01 PM
To: Guo, Yejun
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] how to set LICENSE for llvm in .bb file

On 3 April 2014 03:16, Guo, Yejun  wrote:

I'm adding package llvm which has its own license: University of Illinois/NCSA 
Open Source License, see at http://llvm.org/releases/3.4/LICENSE.TXT .  I tried 
something for LICENSE in .bb file, but is not recognized by the system. Could 
you please let me know how to set this value? Thanks a lot!


LLVM is already packaged outside of oe-core:

http://layers.openembedded.org/layerindex/branch/master/recipes/?q=llvm

Ross




--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350
--
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto


Re: [yocto] how to set LICENSE for llvm in .bb file

2014-06-24 Thread Guo, Yejun
Hi Randy,

See below for the .bb file that Juan and I created to build llvm+clang 3.3, one 
thing need to mention is that we do not put llvm-config under crossscripts (the 
.bb file in oe-core does so) since we want the same behavior between yocto 
build on host and direct build on target.

LICENSE = "NCSA"
DEPENDS = "libffi libxml2"

SRC_URI = "http://llvm.org/releases/${PV}/llvm-${PV}.src.tar.gz;name=llvm";
SRC_URI += 
"http://llvm.org/releases/${PV}/cfe-${PV}.src.tar.gz;apply=no;name=clang";
SRC_URI[llvm.md5sum] = "40564e1dc390f9844f1711c08b08e391"
SRC_URI[llvm.sha256sum] = 
"68766b1e70d05a25e2f502e997a3cb3937187a3296595cf6e0977d5cd6727578"
SRC_URI[clang.md5sum] = "8284891e3e311829b8e44ac813d0c9ef"
SRC_URI[clang.sha256sum] = 
"b1b55de4ab3a57d3e0331a83e0284610191c77d924e3446498d9113d08dfb996"

S = "${WORKDIR}/llvm-${PV}.src"
LIC_FILES_CHKSUM = 
"file://${S}/LICENSE.TXT;md5=d0a3ef0d3e0e8f5cf59e5ffc273ab1f8"

inherit cmake pkgconfig python-dir pythonnative

LLVM_BUILD_DIR = "${S}/build"

OECMAKE_SOURCEPATH = ".."
OECMAKE_BUILDPATH = "build"
do_unpack() {
tar -xf ${DL_DIR}/llvm-${PV}.src.tar.gz -C ${WORKDIR}
tar -xf ${DL_DIR}/cfe-${PV}.src.tar.gz -C ${S}/tools
mv ${S}/tools/cfe-${PV}.src ${S}/tools/clang
}

do_configure() {
mkdir -p ${LLVM_BUILD_DIR}
cd ${LLVM_BUILD_DIR}
cmake \
.. \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DCMAKE_INSTALL_SO_NO_EXE=0 \
-DCMAKE_TOOLCHAIN_FILE=${WORKDIR}/toolchain.cmake \
-DCMAKE_VERBOSE_MAKEFILE=1 \
-Wno-dev
}

do_compile() {
cd ${LLVM_BUILD_DIR}
oe_runmake llvm-tblgen
oe_runmake clang-tblgen
oe_runmake
}

SYSROOT_PREPROCESS_FUNCS += "llvm_sysroot_preprocess"

llvm_sysroot_preprocess() {
install -d ${SYSROOT_DESTDIR}${bindir}
install -m 0755 ${LLVM_BUILD_DIR}/bin/llvm-config 
${SYSROOT_DESTDIR}${bindir}/llvm-config
install -m 0755 ${LLVM_BUILD_DIR}/bin/llvm-as 
${SYSROOT_DESTDIR}${bindir}/llvm-as
install -m 0755 ${LLVM_BUILD_DIR}/bin/llvm-link 
${SYSROOT_DESTDIR}${bindir}/llvm-link
install -m 0755 ${LLVM_BUILD_DIR}/bin/clang 
${SYSROOT_DESTDIR}${bindir}/clang
}

FILES_${PN}-dev += " ${libdir}/BugpointPasses.so \
 ${libdir}/LLVMHello.so \
 ${libdir}/clang  \
   "

Thanks
Yejun

-Original Message-
From: Randy MacLeod [mailto:randy.macl...@windriver.com] 
Sent: Wednesday, June 25, 2014 3:07 AM
To: Guo, Yejun
Cc: yocto@yoctoproject.org
Subject: Re: [yocto] how to set LICENSE for llvm in .bb file

On 14-04-03 04:54 AM, Guo, Yejun wrote:
> Thank you Ross, what I actually need is llvm+clang, it is a very good 
> reference for me to resolve the license issue, and the 
> SYSROOT_PREPROCESS_FUNCS knowledge to resolve llvm-config issue.
>
>
> Thanks
> Yejun

Yejun,

Did you ever produce a recipe to build clang?

Are you also trying to build all of YP with it?

A student that worked with me did some work to use clang to build yocto 
packages:

http://lists.openembedded.org/pipermail/openembedded-core/2013-November/086275.html

so I'd be interested in hearing about your work.

../Randy


>
>
> -----Original Message-----
> From: Burton, Ross [mailto:ross.bur...@intel.com]
> Sent: Thursday, April 03, 2014 2:01 PM
> To: Guo, Yejun
> Cc: yocto@yoctoproject.org
> Subject: Re: [yocto] how to set LICENSE for llvm in .bb file
>
> On 3 April 2014 03:16, Guo, Yejun  wrote:
>> I'm adding package llvm which has its own license: University of 
>> Illinois/NCSA Open Source License, see at 
>> http://llvm.org/releases/3.4/LICENSE.TXT .  I tried something for LICENSE in 
>> .bb file, but is not recognized by the system. Could you please let me know 
>> how to set this value? Thanks a lot!
>
> LLVM is already packaged outside of oe-core:
>
> http://layers.openembedded.org/layerindex/branch/master/recipes/?q=llv
> m
>
> Ross
>


--
# Randy MacLeod. SMTS, Linux, Wind River
Direct: 613.963.1350
-- 
___
yocto mailing list
yocto@yoctoproject.org
https://lists.yoctoproject.org/listinfo/yocto