summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt4_arch.inc
blob: e8c8fabe686d19454926798deb7765e759282cb9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
inherit siteinfo

ARM_INSTRUCTION_SET = "arm"

def qt_arch(d):
    import bb, re
    arch = bb.data.getVar('TARGET_ARCH', d, 1)
    if re.match("^i.86$", arch):
        arch = "i386"
    elif re.match("^arm.*", arch):
        arch = "arm"
    elif arch == "x86_64":
        arch = "x86"
    elif arch == "mipsel":
        arch = "mips"
    return arch

def qt_endian(d):
    import bb
    if bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "le":
        return "-little-endian"
    elif bb.data.getVar('SITEINFO_ENDIANNESS', d, True) == "be":
        return "-big-endian"
    else:
        assert False