Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | inherit relocatable |
| 2 | |
| 3 | # Cross packages are built indirectly via dependency, |
| 4 | # no need for them to be a direct target of 'world' |
| 5 | EXCLUDE_FROM_WORLD = "1" |
| 6 | |
| 7 | CLASSOVERRIDE = "class-cross" |
| 8 | PACKAGES = "" |
| 9 | PACKAGES_DYNAMIC = "" |
| 10 | PACKAGES_DYNAMIC_class-native = "" |
| 11 | |
| 12 | HOST_ARCH = "${BUILD_ARCH}" |
| 13 | HOST_VENDOR = "${BUILD_VENDOR}" |
| 14 | HOST_OS = "${BUILD_OS}" |
| 15 | HOST_PREFIX = "${BUILD_PREFIX}" |
| 16 | HOST_CC_ARCH = "${BUILD_CC_ARCH}" |
| 17 | HOST_LD_ARCH = "${BUILD_LD_ARCH}" |
| 18 | HOST_AS_ARCH = "${BUILD_AS_ARCH}" |
| 19 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 20 | export lt_cv_sys_lib_dlsearch_path_spec = "${libdir} ${base_libdir} /lib /lib64 /usr/lib /usr/lib64" |
| 21 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 22 | STAGING_DIR_HOST = "${RECIPE_SYSROOT_NATIVE}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 23 | |
| 24 | PACKAGE_ARCH = "${BUILD_ARCH}" |
| 25 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 26 | MULTIMACH_TARGET_SYS = "${BUILD_ARCH}${BUILD_VENDOR}-${BUILD_OS}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 27 | |
| 28 | export PKG_CONFIG_DIR = "${exec_prefix}/lib/pkgconfig" |
| 29 | export PKG_CONFIG_SYSROOT_DIR = "" |
| 30 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 31 | TARGET_CPPFLAGS = "" |
| 32 | TARGET_CFLAGS = "" |
| 33 | TARGET_CXXFLAGS = "" |
| 34 | TARGET_LDFLAGS = "" |
| 35 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 36 | CPPFLAGS = "${BUILD_CPPFLAGS}" |
| 37 | CFLAGS = "${BUILD_CFLAGS}" |
| 38 | CXXFLAGS = "${BUILD_CFLAGS}" |
| 39 | LDFLAGS = "${BUILD_LDFLAGS}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 40 | |
| 41 | TOOLCHAIN_OPTIONS = "" |
| 42 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 43 | # This class encodes staging paths into its scripts data so can only be |
| 44 | # reused if we manipulate the paths. |
| 45 | SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}" |
| 46 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 47 | # Path mangling needed by the cross packaging |
| 48 | # Note that we use := here to ensure that libdir and includedir are |
| 49 | # target paths. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 50 | target_base_prefix := "${root_prefix}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 51 | target_prefix := "${prefix}" |
| 52 | target_exec_prefix := "${exec_prefix}" |
| 53 | target_base_libdir = "${target_base_prefix}/${baselib}" |
| 54 | target_libdir = "${target_exec_prefix}/${baselib}" |
| 55 | target_includedir := "${includedir}" |
| 56 | |
| 57 | # Overrides for paths |
| 58 | CROSS_TARGET_SYS_DIR = "${TARGET_SYS}" |
| 59 | prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
| 60 | base_prefix = "${STAGING_DIR_NATIVE}" |
| 61 | exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
| 62 | bindir = "${exec_prefix}/bin/${CROSS_TARGET_SYS_DIR}" |
| 63 | sbindir = "${bindir}" |
| 64 | base_bindir = "${bindir}" |
| 65 | base_sbindir = "${bindir}" |
| 66 | libdir = "${exec_prefix}/lib/${CROSS_TARGET_SYS_DIR}" |
| 67 | libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}" |
| 68 | |
| 69 | do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" |
| 70 | do_populate_sysroot[stamp-extra-info] = "" |
| 71 | do_packagedata[stamp-extra-info] = "" |
| 72 | |
| 73 | do_install () { |
| 74 | oe_runmake 'DESTDIR=${D}' install |
| 75 | } |
| 76 | |
| 77 | USE_NLS = "no" |
| 78 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 79 | export CC = "${BUILD_CC}" |
| 80 | export CXX = "${BUILD_CXX}" |
| 81 | export FC = "${BUILD_FC}" |
| 82 | export CPP = "${BUILD_CPP}" |
| 83 | export LD = "${BUILD_LD}" |
| 84 | export CCLD = "${BUILD_CCLD}" |
| 85 | export AR = "${BUILD_AR}" |
| 86 | export AS = "${BUILD_AS}" |
| 87 | export RANLIB = "${BUILD_RANLIB}" |
| 88 | export STRIP = "${BUILD_STRIP}" |
| 89 | export NM = "${BUILD_NM}" |
| 90 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 91 | inherit nopackages |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 92 | |
| 93 | python do_addto_recipe_sysroot () { |
| 94 | bb.build.exec_func("extend_recipe_sysroot", d) |
| 95 | } |
| 96 | addtask addto_recipe_sysroot after do_populate_sysroot |