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}" |
| 40 | LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}" |
| 41 | |
| 42 | TOOLCHAIN_OPTIONS = "" |
| 43 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 44 | # This class encodes staging paths into its scripts data so can only be |
| 45 | # reused if we manipulate the paths. |
| 46 | SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}" |
| 47 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 48 | # Path mangling needed by the cross packaging |
| 49 | # Note that we use := here to ensure that libdir and includedir are |
| 50 | # target paths. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 51 | target_base_prefix := "${root_prefix}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 52 | target_prefix := "${prefix}" |
| 53 | target_exec_prefix := "${exec_prefix}" |
| 54 | target_base_libdir = "${target_base_prefix}/${baselib}" |
| 55 | target_libdir = "${target_exec_prefix}/${baselib}" |
| 56 | target_includedir := "${includedir}" |
| 57 | |
| 58 | # Overrides for paths |
| 59 | CROSS_TARGET_SYS_DIR = "${TARGET_SYS}" |
| 60 | prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
| 61 | base_prefix = "${STAGING_DIR_NATIVE}" |
| 62 | exec_prefix = "${STAGING_DIR_NATIVE}${prefix_native}" |
| 63 | bindir = "${exec_prefix}/bin/${CROSS_TARGET_SYS_DIR}" |
| 64 | sbindir = "${bindir}" |
| 65 | base_bindir = "${bindir}" |
| 66 | base_sbindir = "${bindir}" |
| 67 | libdir = "${exec_prefix}/lib/${CROSS_TARGET_SYS_DIR}" |
| 68 | libexecdir = "${exec_prefix}/libexec/${CROSS_TARGET_SYS_DIR}" |
| 69 | |
| 70 | do_populate_sysroot[sstate-inputdirs] = "${SYSROOT_DESTDIR}/${STAGING_DIR_NATIVE}/" |
| 71 | do_populate_sysroot[stamp-extra-info] = "" |
| 72 | do_packagedata[stamp-extra-info] = "" |
| 73 | |
| 74 | do_install () { |
| 75 | oe_runmake 'DESTDIR=${D}' install |
| 76 | } |
| 77 | |
| 78 | USE_NLS = "no" |
| 79 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 80 | export CC = "${BUILD_CC}" |
| 81 | export CXX = "${BUILD_CXX}" |
| 82 | export FC = "${BUILD_FC}" |
| 83 | export CPP = "${BUILD_CPP}" |
| 84 | export LD = "${BUILD_LD}" |
| 85 | export CCLD = "${BUILD_CCLD}" |
| 86 | export AR = "${BUILD_AR}" |
| 87 | export AS = "${BUILD_AS}" |
| 88 | export RANLIB = "${BUILD_RANLIB}" |
| 89 | export STRIP = "${BUILD_STRIP}" |
| 90 | export NM = "${BUILD_NM}" |
| 91 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 92 | inherit nopackages |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 93 | |
| 94 | python do_addto_recipe_sysroot () { |
| 95 | bb.build.exec_func("extend_recipe_sysroot", d) |
| 96 | } |
| 97 | addtask addto_recipe_sysroot after do_populate_sysroot |