Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # SDK packages are built either explicitly by the user, |
| 2 | # or indirectly via dependency. No need to be in 'world'. |
| 3 | EXCLUDE_FROM_WORLD = "1" |
| 4 | |
| 5 | STAGING_BINDIR_TOOLCHAIN = "${STAGING_DIR_NATIVE}${bindir_native}/${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" |
| 6 | |
| 7 | # libc for the SDK can be different to that of the target |
| 8 | NATIVESDKLIBC ?= "libc-glibc" |
| 9 | LIBCOVERRIDE = ":${NATIVESDKLIBC}" |
| 10 | CLASSOVERRIDE = "class-nativesdk" |
| 11 | MACHINEOVERRIDES = "" |
| 12 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 13 | MULTILIBS = "" |
| 14 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 15 | # |
| 16 | # Update PACKAGE_ARCH and PACKAGE_ARCHS |
| 17 | # |
| 18 | PACKAGE_ARCH = "${SDK_ARCH}-${SDKPKGSUFFIX}" |
| 19 | PACKAGE_ARCHS = "${SDK_PACKAGE_ARCHS}" |
| 20 | |
| 21 | # |
| 22 | # We need chrpath >= 0.14 to ensure we can deal with 32 and 64 bit |
| 23 | # binaries |
| 24 | # |
| 25 | DEPENDS_append = " chrpath-replacement-native" |
| 26 | EXTRANATIVEPATH += "chrpath-native" |
| 27 | |
| 28 | STAGING_DIR_HOST = "${STAGING_DIR}/${MULTIMACH_HOST_SYS}" |
| 29 | STAGING_DIR_TARGET = "${STAGING_DIR}/${MULTIMACH_TARGET_SYS}" |
| 30 | PKGDATA_DIR = "${STAGING_DIR_HOST}/pkgdata" |
| 31 | |
| 32 | HOST_ARCH = "${SDK_ARCH}" |
| 33 | HOST_VENDOR = "${SDK_VENDOR}" |
| 34 | HOST_OS = "${SDK_OS}" |
| 35 | HOST_PREFIX = "${SDK_PREFIX}" |
| 36 | HOST_CC_ARCH = "${SDK_CC_ARCH}" |
| 37 | HOST_LD_ARCH = "${SDK_LD_ARCH}" |
| 38 | HOST_AS_ARCH = "${SDK_AS_ARCH}" |
| 39 | #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}" |
| 40 | |
| 41 | TARGET_ARCH = "${SDK_ARCH}" |
| 42 | TARGET_VENDOR = "${SDK_VENDOR}" |
| 43 | TARGET_OS = "${SDK_OS}" |
| 44 | TARGET_PREFIX = "${SDK_PREFIX}" |
| 45 | TARGET_CC_ARCH = "${SDK_CC_ARCH}" |
| 46 | TARGET_LD_ARCH = "${SDK_LD_ARCH}" |
| 47 | TARGET_AS_ARCH = "${SDK_AS_ARCH}" |
| 48 | TARGET_FPU = "" |
| 49 | EXTRA_OECONF_GCC_FLOAT = "" |
| 50 | |
| 51 | CPPFLAGS = "${BUILDSDK_CPPFLAGS}" |
| 52 | CFLAGS = "${BUILDSDK_CFLAGS}" |
| 53 | CXXFLAGS = "${BUILDSDK_CFLAGS}" |
| 54 | LDFLAGS = "${BUILDSDK_LDFLAGS}" |
| 55 | |
| 56 | # Change to place files in SDKPATH |
| 57 | base_prefix = "${SDKPATHNATIVE}" |
| 58 | prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" |
| 59 | exec_prefix = "${SDKPATHNATIVE}${prefix_nativesdk}" |
| 60 | baselib = "lib" |
| 61 | sbindir = "${bindir}" |
| 62 | |
| 63 | export PKG_CONFIG_DIR = "${STAGING_DIR_HOST}${libdir}/pkgconfig" |
| 64 | export PKG_CONFIG_SYSROOT_DIR = "${STAGING_DIR_HOST}" |
| 65 | |
| 66 | python nativesdk_virtclass_handler () { |
| 67 | pn = e.data.getVar("PN", True) |
| 68 | if not (pn.endswith("-nativesdk") or pn.startswith("nativesdk-")): |
| 69 | return |
| 70 | |
| 71 | e.data.setVar("MLPREFIX", "nativesdk-") |
| 72 | e.data.setVar("PN", "nativesdk-" + e.data.getVar("PN", True).replace("-nativesdk", "").replace("nativesdk-", "")) |
| 73 | e.data.setVar("OVERRIDES", e.data.getVar("OVERRIDES", False) + ":virtclass-nativesdk") |
| 74 | } |
| 75 | |
| 76 | python () { |
| 77 | pn = d.getVar("PN", True) |
| 78 | if not pn.startswith("nativesdk-"): |
| 79 | return |
| 80 | |
| 81 | import oe.classextend |
| 82 | |
| 83 | clsextend = oe.classextend.NativesdkClassExtender("nativesdk", d) |
| 84 | clsextend.rename_packages() |
| 85 | clsextend.rename_package_variables((d.getVar("PACKAGEVARS", True) or "").split()) |
| 86 | |
| 87 | clsextend.map_depends_variable("DEPENDS") |
| 88 | clsextend.map_packagevars() |
| 89 | clsextend.map_variable("PROVIDES") |
| 90 | clsextend.map_regexp_variable("PACKAGES_DYNAMIC") |
| 91 | } |
| 92 | |
| 93 | addhandler nativesdk_virtclass_handler |
| 94 | nativesdk_virtclass_handler[eventmask] = "bb.event.RecipePreFinalise" |
| 95 | |
| 96 | do_populate_sysroot[stamp-extra-info] = "" |
| 97 | do_packagedata[stamp-extra-info] = "" |
| 98 | |
| 99 | USE_NLS = "${SDKUSE_NLS}" |
Brad Bishop | 37a0e4d | 2017-12-04 01:01:44 -0500 | [diff] [blame^] | 100 | |
| 101 | OLDEST_KERNEL = "${SDK_OLDEST_KERNEL}" |