1 # We want cross packages to be relocatable
4 # Cross packages are built indirectly via dependency,
5 # no need for them to be a direct target of 'world'
6 EXCLUDE_FROM_WORLD = "1"
8 # In order to keep TARGET_PREFIX decoupled from TARGET_SYS, let's force the
9 # binary names to match the former, rather than relying on autoconf's implicit
10 # prefixing based on the latter.
11 EXTRA_OECONF_append = " --program-prefix=${TARGET_PREFIX}"
13 # Save PACKAGE_ARCH before changing HOST_ARCH
14 OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}"
15 PACKAGE_ARCH = "${OLD_PACKAGE_ARCH}"
16 # Also save BASE_PACKAGE_ARCH since HOST_ARCH can influence it
17 OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}"
18 BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}"
20 HOST_ARCH = "${BUILD_ARCH}"
21 HOST_VENDOR = "${BUILD_VENDOR}"
22 HOST_OS = "${BUILD_OS}"
23 HOST_PREFIX = "${BUILD_PREFIX}"
24 HOST_CC_ARCH = "${BUILD_CC_ARCH}"
25 HOST_EXEEXT = "${BUILD_EXEEXT}"
26 BASEPKG_HOST_SYS = "${HOST_ARCH}${HOST_VENDOR}-${HOST_OS}"
28 CPPFLAGS = "${BUILD_CPPFLAGS}"
29 CFLAGS = "${BUILD_CFLAGS}"
30 CXXFLAGS = "${BUILD_CFLAGS}"
31 LDFLAGS = "${BUILD_LDFLAGS}"
32 LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}"
34 TOOLCHAIN_OPTIONS = ""
36 DEPENDS_GETTEXT = "gettext-native"
38 # Path mangling needed by the cross packaging
39 # Note that we use := here to ensure that libdir and includedir are
40 # target paths, not CROSS_DIR paths.
41 target_libdir := "${libdir}"
42 target_includedir := "${includedir}"
43 target_base_libdir := "${base_libdir}"
44 target_prefix := "${prefix}"
47 base_prefix = "${STAGING_DIR_NATIVE}"
48 prefix = "${base_prefix}${prefix_native}/${BASE_PACKAGE_ARCH}"
49 exec_prefix = "${prefix}"
50 base_sbindir = "${base_prefix}/bin"
51 sbindir = "${exec_prefix}/bin"
53 # staging should be special for cross
55 SHLIBSDIR = "${STAGING_DIR_NATIVE}/shlibs"
58 oe_runmake 'DESTDIR=${D}' install
62 # Override the default sysroot staging copy since this won't look like a target system
65 sysroot_stage_dir ${D} ${SYSROOT_DESTDIR}
66 install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}/
67 install -d ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}/
68 if [ -d ${SYSROOT_DESTDIR}${target_base_libdir} ]; then
69 sysroot_stage_libdir ${SYSROOT_DESTDIR}${target_base_libdir} ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_base_libdir}
71 if [ -d ${SYSROOT_DESTDIR}${target_libdir} ]; then
72 sysroot_stage_libdir ${SYSROOT_DESTDIR}${target_libdir} ${SYSROOT_DESTDIR}${STAGING_DIR_TARGET}${target_libdir}
77 # Cross .la files have more path issues we have to correct only for libtool < 2.4
78 SYSROOTEXTRALIBDIRSED_OLD = " -e \"/^libdir=/s,.*,libdir=${target_libdir},g\" -e \"/^dependency_libs=/s,\([[:space:]']\)-L${STAGING_LIBDIR_NATIVE},,g\""
80 SYSROOTEXTRALIBDIRSED = "${@["${SYSROOTEXTRALIBDIRSED_OLD}",""][("${LIBTOOL_HAS_SYSROOT}" == "yes")]}"