blob: f832561daf85357fe87c251c2428654ae97c0a62 [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}/"
73do_populate_sysroot[stamp-extra-info] = ""
74do_packagedata[stamp-extra-info] = ""
75
76do_install () {
77 oe_runmake 'DESTDIR=${D}' install
78}
79
80USE_NLS = "no"
81
Patrick Williamsc0f7c042017-02-23 20:41:17 -060082export CC = "${BUILD_CC}"
83export CXX = "${BUILD_CXX}"
84export FC = "${BUILD_FC}"
85export CPP = "${BUILD_CPP}"
86export LD = "${BUILD_LD}"
87export CCLD = "${BUILD_CCLD}"
88export AR = "${BUILD_AR}"
89export AS = "${BUILD_AS}"
90export RANLIB = "${BUILD_RANLIB}"
91export STRIP = "${BUILD_STRIP}"
92export NM = "${BUILD_NM}"
93
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050094inherit nopackages
Brad Bishop316dfdd2018-06-25 12:45:53 -040095
96python do_addto_recipe_sysroot () {
97 bb.build.exec_func("extend_recipe_sysroot", d)
98}
99addtask addto_recipe_sysroot after do_populate_sysroot