blob: bfec91d04331f395b4d8826c4ce1691cfc806c81 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001inherit relocatable
2
3# Cross packages are built indirectly via dependency,
4# no need for them to be a direct target of 'world'
5EXCLUDE_FROM_WORLD = "1"
6
7CLASSOVERRIDE = "class-cross"
8PACKAGES = ""
9PACKAGES_DYNAMIC = ""
10PACKAGES_DYNAMIC_class-native = ""
11
12HOST_ARCH = "${BUILD_ARCH}"
13HOST_VENDOR = "${BUILD_VENDOR}"
14HOST_OS = "${BUILD_OS}"
15HOST_PREFIX = "${BUILD_PREFIX}"
16HOST_CC_ARCH = "${BUILD_CC_ARCH}"
17HOST_LD_ARCH = "${BUILD_LD_ARCH}"
18HOST_AS_ARCH = "${BUILD_AS_ARCH}"
19
Brad Bishop19323692019-04-05 15:28:33 -040020# No strip sysroot when DEBUG_BUILD is enabled
21INHIBIT_SYSROOT_STRIP ?= "${@oe.utils.vartrue('DEBUG_BUILD', '1', '', d)}"
22
Patrick Williamsc0f7c042017-02-23 20:41:17 -060023export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64"
24
Brad Bishop6e60e8b2018-02-01 10:27:11 -050025STAGING_DIR_HOST = "${RECIPE_SYSROOT_NATIVE}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
27PACKAGE_ARCH = "${BUILD_ARCH}"
28
Brad Bishop6e60e8b2018-02-01 10:27:11 -050029MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030
31export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig"
32export PKG_CONFIG_SYSROOT_DIR = ""
33
Brad Bishop6e60e8b2018-02-01 10:27:11 -050034TARGET_CPPFLAGS = ""
35TARGET_CFLAGS = ""
36TARGET_CXXFLAGS = ""
37TARGET_LDFLAGS = ""
38
Patrick Williamsc124f4f2015-09-15 14:41:29 -050039CPPFLAGS = "${BUILD_CPPFLAGS}"
40CFLAGS = "${BUILD_CFLAGS}"
41CXXFLAGS = "${BUILD_CFLAGS}"
42LDFLAGS = "${BUILD_LDFLAGS}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050043
44TOOLCHAIN_OPTIONS = ""
45
Brad Bishop6e60e8b2018-02-01 10:27:11 -050046# This class encodes staging paths into its scripts data so can only be
47# reused if we manipulate the paths.
48SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
49
Patrick Williamsc124f4f2015-09-15 14:41:29 -050050# Path mangling needed by the cross packaging
51# Note that we use := here to ensure that libdir and includedir are
52# target paths.
Brad Bishopd7bf8c12018-02-25 22:55:05 -050053target_base_prefix := "${root_prefix}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050054target_prefix := "${prefix}"
55target_exec_prefix := "${exec_prefix}"
56target_base_libdir = "${target_base_prefix}/${baselib}"
57target_libdir = "${target_exec_prefix}/${baselib}"
58target_includedir := "${includedir}"
59
60# Overrides for paths
61CROSS_TARGET_SYS_DIR = "${TARGET_SYS}"
62prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
63base_prefix = "${STAGING_DIR_NATIVE}"
64exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}"
65bindir = "${exec_prefix}/bin/${CROSS_TARGET_SYS_DIR}"
66sbindir = "${bindir}"
67base_bindir = "${bindir}"
68base_sbindir = "${bindir}"
69libdir = "${exec_prefix}/lib/${CROSS_TARGET_SYS_DIR}"
70libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}"
71
72do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050073do_packagedata[stamp-extra-info] = ""
74
75do_install () {
76 oe_runmake 'DESTDIR=${D}' install
77}
78
79USE_NLS = "no"
80
Patrick Williamsc0f7c042017-02-23 20:41:17 -060081export CC = "${BUILD_CC}"
82export CXX = "${BUILD_CXX}"
83export FC = "${BUILD_FC}"
84export CPP = "${BUILD_CPP}"
85export LD = "${BUILD_LD}"
86export CCLD = "${BUILD_CCLD}"
87export AR = "${BUILD_AR}"
88export AS = "${BUILD_AS}"
89export RANLIB = "${BUILD_RANLIB}"
90export STRIP = "${BUILD_STRIP}"
91export NM = "${BUILD_NM}"
92
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050093inherit nopackages
Brad Bishop316dfdd2018-06-25 12:45:53 -040094
95python do_addto_recipe_sysroot () {
96 bb.build.exec_func("extend_recipe_sysroot", d)
97}
98addtask addto_recipe_sysroot after do_populate_sysroot
Andrew Geissler82c905d2020-04-13 13:39:40 -050099do_addto_recipe_sysroot[deptask] = "do_populate_sysroot"