summaryrefslogtreecommitdiff
path: root/meta-arm/meta-arm/recipes-security/trusted-services/ts-newlib_4.1.0.bb
blob: 408c7d3c2430eb9eb445a65e1632e7ff5e9cc34b (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
26
27
28
29
30
31
32
SUMMARY = "Newlib static libraries built with Trusted Services opteesp deployment options"

TS_ENV = "opteesp"

require trusted-services.inc

SRC_URI += "git://sourceware.org/git/newlib-cygwin.git;name=newlib;protocol=https;branch=master;destsuffix=git/newlib \
"

# tag "newlib-0.4.1"
SRCREV_newlib = "415fdd4279b85eeec9d54775ce13c5c412451e08"
LIC_FILES_CHKSUM += "file://../newlib/COPYING.NEWLIB;md5=b8dda70da54e0efb49b1074f349d7749"

# Newlib does not compile with clang
TOOLCHAIN = "gcc"

EXTRA_OECMAKE += '-DNEWLIB_SOURCE_DIR=${WORKDIR}/git/newlib \
                  -DNEWLIB_CFLAGS="--sysroot=${STAGING_DIR_HOST}" \
                 '

OECMAKE_SOURCEPATH = "${S}/deployments/newlib/${TS_ENV}/"

# TS ships a patch that needs to be applied to newlib
apply_ts_patch() {
    for p in ${S}/external/newlib/*.patch; do
        patch -p1 -d ${WORKDIR}/git/newlib < ${p}
    done
}
do_patch[postfuncs] += "apply_ts_patch"

FILES:${PN}-dev = "${TS_INSTALL}/newlib"
FILES:${PN}-staticdev = "${TS_INSTALL}/newlib/*/lib/*.a"