[oe] [meta-oe][PATCH] llvm3.2: new recipe
Marcin Juszkiewicz
marcin at juszkiewicz.com.pl
Tue Jun 11 09:10:40 UTC 2013
W dniu 11.06.2013 11:07, Khem Raj pisze:
>
> On Jun 11, 2013, at 1:54 AM, Marcin Juszkiewicz <marcin at juszkiewicz.com.pl> wrote:
>
>>> in this case arch does not map to what OE's target arch is so you have
>>> to do it twice if you want to use COMPATIBLE_HOST
>>
>> It has 7 OE architectures: i.86, x86_64, arm, mips(el), powerpc(64)
>> which are then mapped into 5 llvm ones. Can be gathered into one
>> COMPATIBLE_HOST (copied from kexec-tools):
>>
>> COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|powerpc.*|mips.*)-(linux)'
>>
>> "mips.*" probably needs to be changed to "mips(el)?" to not cover mips64.
>
> and how will you fold it into -DLLVM_TARGETS_TO_BUILD=<arch>
>
> where arch is not same as OE's target arch so you need the mapping function
> anyway was my point.
+def get_llvm_arch(d):
+ import bb;
+
+ arch = bb.data.getVar('TARGET_ARCH', d, 1)
+
+ if arch == "x86_64" or arch == "i486" or arch == "i586" or arch ==
"i686":
+ arch = "x86"
+ elif arch == "x86_64":
+ arch = "x86_64"
+ elif arch == "arm":
+ arch = "arm"
+ elif arch == "mipsel" or arch == "mips":
+ arch = "mips"
+ elif arch == "powerpc" or arch == "powerpc64":
+ arch = "powerpc"
+
+ return arch
And done. If you try to build recipe secured by COMPATIBLE_HOST for not
compatible architecture then you have to deal with effects.
More information about the Openembedded-devel
mailing list