From 58fb511d5ab1dccc741f8fac1349de93e2e3d733 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 9 Jan 2009 00:10:48 +0000 Subject: siteinfo.bbclass: Add cygwin and mingw entries --- classes/siteinfo.bbclass | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'classes') diff --git a/classes/siteinfo.bbclass b/classes/siteinfo.bbclass index ee4e4b3299..55ab371af3 100644 --- a/classes/siteinfo.bbclass +++ b/classes/siteinfo.bbclass @@ -40,6 +40,14 @@ def get_siteinfo_list(d): "i486-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i586-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ "i686-linux-uclibc": "endian-little bit-32 common-linux common-uclibc ix86-common",\ + "i386-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i486-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i586-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i686-cygwin": "endian-little bit-32 common-cygwin ix86-common",\ + "i386-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i486-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i586-mingw32": "endian-little bit-32 common-mingw ix86-common",\ + "i686-mingw32": "endian-little bit-32 common-mingw ix86-common",\ "mipsel-linux": "endian-little bit-32 common-linux common-glibc",\ "mipsel-linux-uclibc": "endian-little bit-32 common-linux common-uclibc",\ "mips-linux": "endian-big bit-32 common-linux common-glibc",\ -- cgit v1.2.3 From 5563af5f6c4f046dae147502ff75f0ae2fb589fb Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 9 Jan 2009 00:17:11 +0000 Subject: bitbake.conf: Add EXEEXT variables for BUILD/HOST/TARGET so we can start to handle other architectures --- classes/cross.bbclass | 1 + classes/native.bbclass | 2 ++ classes/sdk.bbclass | 1 + 3 files changed, 4 insertions(+) (limited to 'classes') diff --git a/classes/cross.bbclass b/classes/cross.bbclass index 9dddca127a..7debde6669 100644 --- a/classes/cross.bbclass +++ b/classes/cross.bbclass @@ -16,6 +16,7 @@ HOST_VENDOR = "${BUILD_VENDOR}" HOST_OS = "${BUILD_OS}" HOST_PREFIX = "${BUILD_PREFIX}" HOST_CC_ARCH = "${BUILD_CC_ARCH}" +HOST_EXEEXT = "${BUILD_EXEEXT}" CPPFLAGS = "${BUILD_CPPFLAGS}" CFLAGS = "${BUILD_CFLAGS}" diff --git a/classes/native.bbclass b/classes/native.bbclass index 61048b6b14..4f3856ccf5 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -18,12 +18,14 @@ TARGET_OS = "${BUILD_OS}" TARGET_VENDOR = "${BUILD_VENDOR}" TARGET_PREFIX = "${BUILD_PREFIX}" TARGET_CC_ARCH = "${BUILD_CC_ARCH}" +TARGET_EXEEXT = "${BUILD_EXEEXT}" HOST_ARCH = "${BUILD_ARCH}" HOST_OS = "${BUILD_OS}" HOST_VENDOR = "${BUILD_VENDOR}" HOST_PREFIX = "${BUILD_PREFIX}" HOST_CC_ARCH = "${BUILD_CC_ARCH}" +HOST_EXEEXT = "${BUILD_EXEEXT}" CPPFLAGS = "${BUILD_CPPFLAGS}" CFLAGS = "${BUILD_CFLAGS}" diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index 6c66eac7ad..da6cab9cd5 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -20,6 +20,7 @@ HOST_OS = "${BUILD_OS}" HOST_PREFIX = "${BUILD_PREFIX}" HOST_CC_ARCH = "${BUILD_CC_ARCH}" #HOST_SYS = "${HOST_ARCH}${TARGET_VENDOR}-${HOST_OS}" +HOST_EXEEXT = "${BUILD_EXEEXT}" CPPFLAGS = "${BUILD_CPPFLAGS}" CFLAGS = "${BUILD_CFLAGS}" -- cgit v1.2.3 From aabadc9673e60172e13e8dd41d215c4591c3992f Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Fri, 9 Jan 2009 00:25:04 +0000 Subject: insane.bbclass: Add handling for canadian classes --- classes/insane.bbclass | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 6bcaa22e04..3e32830fbb 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -289,8 +289,9 @@ def package_qa_check_arch(path,name,d, elf): target_arch = bb.data.getVar('TARGET_ARCH', d, True) # FIXME: Cross package confuse this check, so just skip them - if bb.data.inherits_class('cross', d) or bb.data.inherits_class('sdk', d): - return True + for s in ['cross', 'sdk', 'canadian-cross', 'canadian-sdk']: + if bb.data.inherits_class(s, d): + return True # avoid following links to /usr/bin (e.g. on udev builds) # we will check the files pointed to anyway... @@ -381,8 +382,11 @@ def package_qa_check_staged(path,d): workdir = os.path.join(tmpdir, "work") installed = "installed=yes" - if bb.data.inherits_class("native", d) or bb.data.inherits_class("cross", d): - pkgconfigcheck = workdir + iscrossnative = False + for s in ['cross', 'native', 'canadian-cross', 'canadian-native']: + if bb.data.inherits_class(s, d): + pkgconfigcheck = workdir + iscrossnative = True else: pkgconfigcheck = tmpdir @@ -395,7 +399,7 @@ def package_qa_check_staged(path,d): if file[-2:] == "la": file_content = open(path).read() # Don't check installed status for native/cross packages - if not bb.data.inherits_class("native", d) and not bb.data.inherits_class("cross", d): + if not iscrossnative: if installed in file_content: error_msg = "%s failed sanity test (installed) in path %s" % (file,root) sane = package_qa_handle_error(5, error_msg, "staging", path, d) -- cgit v1.2.3 From c460a9393593c5d3f65e88bd06331313c87a8937 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Sat, 10 Jan 2009 14:08:27 -0500 Subject: insane.bbclass: Fix thinko in package_qa_check_staged logic for iscrossnative --- classes/insane.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/insane.bbclass b/classes/insane.bbclass index 3e32830fbb..3a2cadcaff 100644 --- a/classes/insane.bbclass +++ b/classes/insane.bbclass @@ -383,12 +383,11 @@ def package_qa_check_staged(path,d): installed = "installed=yes" iscrossnative = False + pkgconfigcheck = tmpdir for s in ['cross', 'native', 'canadian-cross', 'canadian-native']: if bb.data.inherits_class(s, d): pkgconfigcheck = workdir iscrossnative = True - else: - pkgconfigcheck = tmpdir # find all .la and .pc files # read the content -- cgit v1.2.3 From e602f0edfa99bdc619f9c700b44a26d5b5c67aba Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 16 Jan 2009 22:48:51 -0500 Subject: canadian sdk: Add classes/canadian{,-cross,-native,-sdk}.bbclass --- classes/canadian-cross.bbclass | 76 +++++++++++++++++++++++++++++++ classes/canadian-native.bbclass | 88 ++++++++++++++++++++++++++++++++++++ classes/canadian-sdk.bbclass | 99 +++++++++++++++++++++++++++++++++++++++++ classes/canadian.bbclass | 24 ++++++++++ 4 files changed, 287 insertions(+) create mode 100644 classes/canadian-cross.bbclass create mode 100644 classes/canadian-native.bbclass create mode 100644 classes/canadian-sdk.bbclass create mode 100644 classes/canadian.bbclass (limited to 'classes') diff --git a/classes/canadian-cross.bbclass b/classes/canadian-cross.bbclass new file mode 100644 index 0000000000..474fb1d2ba --- /dev/null +++ b/classes/canadian-cross.bbclass @@ -0,0 +1,76 @@ +# Canadian cross packages are built indirectly via dependency, +# no need for them to be a direct target of 'world' +EXCLUDE_FROM_WORLD = "1" + +inherit canadian + +PACKAGES = "" + +BASE_PACKAGE_ARCH = "${SDK_ARCH}" +BASEPKG_HOST_SYS = "${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" +BASEPKG_TARGET_SYS = "${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" + +HOST_ARCH = "${BUILD_ARCH}" +HOST_VENDOR = "${BUILD_VENDOR}" +HOST_OS = "${BUILD_OS}" +HOST_PREFIX = "${BUILD_PREFIX}" +HOST_CC_ARCH = "${BUILD_CC_ARCH}" +HOST_EXEEXT = "${BUILD_EXEEXT}" + +TARGET_ARCH = "${SDK_ARCH}" +TARGET_VENDOR = "${SDK_VENDOR}" +TARGET_OS = "${SDK_OS}" +TARGET_PREFIX = "${SDK_PREFIX}" +TARGET_CC_ARCH = "${SDK_CC_ARCH}" +TARGET_EXEEXT = "${SDK_EXEEXT}" + +CPPFLAGS = "${BUILD_CPPFLAGS}" +CFLAGS = "${BUILD_CFLAGS}" +CXXFLAGS = "${BUILD_CFLAGS}" +LDFLAGS = "${BUILD_LDFLAGS}" + +TOOLCHAIN_OPTIONS = "" + +# Architecture dependent paths +bindir = "${exec_prefix}/bin" +sbindir = "${exec_prefix}/bin" +libexecdir = "${exec_prefix}/libexec" +libdir = "${exec_prefix}/lib" +includedir = "${exec_prefix}/include" +oldincludedir = "${exec_prefix}/include" + +# Path prefixes +export base_prefix = "${STAGING_DIR_HOST}" +export prefix = "${STAGING_DIR_HOST}${layout_prefix}" +export exec_prefix = "${STAGING_DIR_HOST}${layout_exec_prefix}" + +# Base paths +export base_bindir = "${STAGING_DIR_HOST}${layout_base_bindir}" +export base_sbindir = "${STAGING_DIR_HOST}${layout_base_sbindir}" +export base_libdir = "${STAGING_DIR_HOST}${layout_base_libdir}" + +# Architecture independent paths +export datadir = "${STAGING_DIR_HOST}${layout_datadir}" +export sysconfdir = "${STAGING_DIR_HOST}${layout_sysconfdir}" +export sharedstatedir = "${STAGING_DIR_HOST}${layout_sharedstatedir}" +export localstatedir = "${STAGING_DIR_HOST}${layout_localstatedir}" +export infodir = "${STAGING_DIR_HOST}${layout_infodir}" +export mandir = "${STAGING_DIR_HOST}${layout_mandir}" +export docdir = "${STAGING_DIR_HOST}${layout_docdir}" +export servicedir = "${STAGING_DIR_HOST}${layout_servicedir}" + +# Architecture dependent paths +export bindir = "${STAGING_DIR_HOST}${layout_bindir}" +export sbindir = "${STAGING_DIR_HOST}${layout_sbindir}" +export libexecdir = "${STAGING_DIR_HOST}${layout_libexecdir}" +export libdir = "${STAGING_DIR_HOST}${layout_libdir}" +export includedir = "${STAGING_DIR_HOST}${layout_includedir}" +export oldincludedir = "${STAGING_DIR_HOST}${layout_includedir}" + +do_stage () { + oe_runmake install +} + +do_install () { + : +} diff --git a/classes/canadian-native.bbclass b/classes/canadian-native.bbclass new file mode 100644 index 0000000000..d572ab5990 --- /dev/null +++ b/classes/canadian-native.bbclass @@ -0,0 +1,88 @@ +inherit base + +# Canadian native packages are built indirectly via dependency, +# no need for them to be a direct target of 'world' +EXCLUDE_FROM_WORLD = "1" + +inherit canadian + +PACKAGES = "" + +BASE_PACKAGE_ARCH = "${SDK_ARCH}" +BASEPKG_HOST_SYS = "${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" +BASEPKG_TARGET_SYS = "${SDK_ARCH}${SDK_VENDOR}-${SDK_OS}" + +HOST_ARCH = "${SDK_ARCH}" +HOST_VENDOR = "${SDK_VENDOR}" +HOST_OS = "${SDK_OS}" +HOST_PREFIX = "${SDK_PREFIX}" +HOST_CC_ARCH = "${SDK_CC_ARCH}" +HOST_EXEEXT = "${SDK_EXEEXT}" + +TARGET_ARCH = "${SDK_ARCH}" +TARGET_VENDOR = "${SDK_VENDOR}" +TARGET_OS = "${SDK_OS}" +TARGET_PREFIX = "${SDK_PREFIX}" +TARGET_CC_ARCH = "${SDK_CC_ARCH}" +TARGET_EXEEXT = "${SDK_EXEEXT}" + +CPPFLAGS = "${SDK_CPPFLAGS}" +CFLAGS = "${SDK_CFLAGS}" +CXXFLAGS = "${SDK_CFLAGS}" +LDFLAGS = "${SDK_LDFLAGS}" + +# set the compiler as well. It could have been set to something else +export CC = "${CCACHE}${SDK_PREFIX}gcc ${HOST_CC_ARCH}" +export CXX = "${CCACHE}${SDK_PREFIX}g++ ${HOST_CC_ARCH}" +export F77 = "${CCACHE}${SDK_PREFIX}g77 ${HOST_CC_ARCH}" +export CPP = "${SDK_PREFIX}gcc -E" +export LD = "${SDK_PREFIX}ld" +#export CCLD = "${CC}" +export AR = "${SDK_PREFIX}ar" +export AS = "${SDK_PREFIX}as" +export RANLIB = "${SDK_PREFIX}ranlib" +export STRIP = "${SDK_PREFIX}strip" + +# Path prefixes +export base_prefix = "${STAGING_DIR_HOST}" +export prefix = "${STAGING_DIR_HOST}${layout_prefix}" +export exec_prefix = "${STAGING_DIR_HOST}${layout_exec_prefix}" + +# Base paths +export base_bindir = "${STAGING_DIR_HOST}${layout_base_bindir}" +export base_sbindir = "${STAGING_DIR_HOST}${layout_base_sbindir}" +export base_libdir = "${STAGING_DIR_HOST}${layout_base_libdir}" + +# Architecture independent paths +export datadir = "${STAGING_DIR_HOST}${layout_datadir}" +export sysconfdir = "${STAGING_DIR_HOST}${layout_sysconfdir}" +export sharedstatedir = "${STAGING_DIR_HOST}${layout_sharedstatedir}" +export localstatedir = "${STAGING_DIR_HOST}${layout_localstatedir}" +export infodir = "${STAGING_DIR_HOST}${layout_infodir}" +export mandir = "${STAGING_DIR_HOST}${layout_mandir}" +export docdir = "${STAGING_DIR_HOST}${layout_docdir}" +export servicedir = "${STAGING_DIR_HOST}${layout_servicedir}" + +# Architecture dependent paths +export bindir = "${STAGING_DIR_HOST}${layout_bindir}" +export sbindir = "${STAGING_DIR_HOST}${layout_sbindir}" +export libexecdir = "${STAGING_DIR_HOST}${layout_libexecdir}" +export libdir = "${STAGING_DIR_HOST}${layout_libdir}" +export includedir = "${STAGING_DIR_HOST}${layout_includedir}" +export oldincludedir = "${STAGING_DIR_HOST}${layout_includedir}" + +do_stage () { + if [ "${INHIBIT_NATIVE_STAGE_INSTALL}" != "1" ] + then + if [ "${AUTOTOOLS_NATIVE_STAGE_INSTALL}" != "1" ] + then + oe_runmake install + else + autotools_stage_all + fi + fi +} + +do_install () { + : +} diff --git a/classes/canadian-sdk.bbclass b/classes/canadian-sdk.bbclass new file mode 100644 index 0000000000..d73b62f485 --- /dev/null +++ b/classes/canadian-sdk.bbclass @@ -0,0 +1,99 @@ +# Canadian SDK packages are built either explicitly by the user, +# or indirectly via dependency. No need to be in 'world'. +EXCLUDE_FROM_WORLD = "1" + +inherit canadian + +PACKAGE_ARCH = "${SDK_SYS}-sdk-${OLD_PACKAGE_ARCH}" +BASE_PACKAGE_ARCH = "${OLD_BASE_PACKAGE_ARCH}" + +HOST_ARCH = "${SDK_ARCH}" +HOST_VENDOR = "${SDK_VENDOR}" +HOST_OS = "${SDK_OS}" +HOST_PREFIX = "${SDK_PREFIX}" +HOST_CC_ARCH = "${SDK_CC_ARCH}" +HOST_EXEEXT = "${SDK_EXEEXT}" + +CPPFLAGS = "${SDK_CPPFLAGS}" +CFLAGS = "${SDK_CFLAGS}" +CXXFLAGS = "${SDK_CFLAGS}" +LDFLAGS = "${SDK_LDFLAGS}" + +# TODO: add logic to add the following unless PN ~= gcc* +#DEPENDS_prepend = "virtual/${HOST_PREFIX}binutils virtual/${HOST_PREFIX}gcc " +# and otherwise just +DEPENDS_prepend = "virtual/${HOST_PREFIX}binutils " + +SDK_PATH_sdk-mingw32 = "/OpenEmbedded/${SDK_NAME}" +SDK_REALPATH = "${SDK_PATH}" +SDK_REALPATH_sdk-mingw32 = "C:/OpenEmbedded/${SDK_NAME}" + +# Path prefixes +prefix = "${SDK_PATH}" +exec_prefix = "${prefix}" +base_prefix = "${prefix}" + +# Base paths +export base_bindir = "${prefix}/bin" +export base_sbindir = "${prefix}/bin" +export base_libdir = "${prefix}/lib" + +# Architecture independent paths +export datadir = "${prefix}/share" +export sysconfdir = "${prefix}/etc" +export sharedstatedir = "${datadir}/com" +export localstatedir = "${prefix}/var" +export infodir = "${datadir}/info" +export mandir = "${datadir}/man" +export docdir = "${datadir}/doc" +export servicedir = "${prefix}/srv" + +# Architecture dependent paths +export bindir = "${prefix}/bin" +export sbindir = "${prefix}/bin" +export libexecdir = "${prefix}/libexec" +export libdir = "${prefix}/lib" +export includedir = "${prefix}/include" +export oldincludedir = "${prefix}/include" + +export dollar = "$" + +canadian_sdk_runconf() { + # modified oe_runconf() + # 1. Override prefix with SDK_REALPATH + # 2. Pass '${prefix}' to configure, to allow for prefix override + # 3. But don't do that for infodir and mandir, as they will + # break gcc makefiles for windows/dos SDK_REALPATH + if [ -x ${S}/configure ] ; then + cfgcmd="${S}/configure \ + --build=${BUILD_SYS} \ + --host=${HOST_SYS} \ + --target=${TARGET_SYS} \ + --prefix=${SDK_REALPATH} \ + --exec-prefix=$dollar{prefix} \ + --bindir=$dollar{prefix}/bin \ + --sbindir=$dollar{prefix}/bin \ + --libexecdir=$dollar{prefix}/libexec \ + --datadir=$dollar{prefix}/share \ + --sysconfdir=$dollar{prefix}/etc \ + --sharedstatedir=$dollar{prefix}/com \ + --localstatedir=$dollar{prefix}/var \ + --libdir=$dollar{prefix}/lib \ + --includedir=$dollar{prefix}/include \ + --oldincludedir=$dollar{prefix}/include \ + --infodir=${prefix}/share/info \ + --mandir=${prefix}/share/man \ + --enable-mainainer-mode \ + ${EXTRA_OECONF} \ + $@" + oenote "Running $cfgcmd..." + $cfgcmd || oefatal "oe_runconf failed" + else + oefatal "no configure script found" + fi +} + +FILES_${PN} = "${prefix}" +FILES_${PN}-dbg += "${prefix}/.debug \ + ${prefix}/bin/.debug \ + " diff --git a/classes/canadian.bbclass b/classes/canadian.bbclass new file mode 100644 index 0000000000..f359a8df7f --- /dev/null +++ b/classes/canadian.bbclass @@ -0,0 +1,24 @@ +# For Canadian SDKs we need to know what these values start out as, and use +# them as well as the updated ones. +OLD_PACKAGE_ARCH := "${PACKAGE_ARCH}" +OLD_MULTIMACH_ARCH := "${MULTIMACH_ARCH}" +OLD_TARGET_VENDOR := "${TARGET_VENDOR}" +OLD_TARGET_OS := "${TARGET_OS}" +OLD_BASE_PACKAGE_ARCH := "${BASE_PACKAGE_ARCH}" + +OLD_MULTIMACH_TARGET_SYS = "${OLD_MULTIMACH_ARCH}${OLD_TARGET_VENDOR}-${OLD_TARGET_OS}" +OLD_BASEPKG_TARGET_SYS = "${OLD_BASE_PACKAGE_ARCH}${OLD_TARGET_VENDOR}-${OLD_TARGET_OS}" + +# We want to allow for both machine-target_os-sdk_arch-sdk_os and for +# sdk_arch-sdk_os +MULTIMACH_SDK_SYS = "${OLD_MULTIMACH_TARGET_SYS}-${SDK_SYS}" +BASEPKG_SDK_SYS = "${OLD_BASEPKG_TARGET_SYS}-${SDK_SYS}" +STAGING_DIR_SDK = "${STAGING_DIR}/${MULTIMACH_SDK_SYS}" + +# Our host dir isn't the build system here, but the SDK system +STAGING_DIR_HOST = "${STAGING_DIR}/${SDK_SYS}" + +# Overrides for paths +STAGING_BINDIR_CROSS = "${STAGING_BINDIR}" + +PACKAGE_ARCH = "${SDK_ARCH}" -- cgit v1.2.3 From 04c9615b938eaabfbadc99c1707eb44657c95a61 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 16 Jan 2009 23:26:23 -0500 Subject: SDK: Rename 'SDK_PREFIX' to 'SDK_PATH' so that it has a meaning analogous to BUILD/TARGET/HOST This isn't a big deal until we introduce the rest of the SDK variables for doing Canadian builds. --- classes/sdk.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'classes') diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index da6cab9cd5..eb34bd04b5 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -28,7 +28,7 @@ CXXFLAGS = "${BUILD_CFLAGS}" LDFLAGS = "${BUILD_LDFLAGS}" # Path prefixes -prefix = "${SDK_PREFIX}" +prefix = "${SDK_PATH}" exec_prefix = "${prefix}" base_prefix = "${prefix}" -- cgit v1.2.3