diff options
24 files changed, 262 insertions, 0 deletions
diff --git a/COPYING.MIT b/COPYING.MIT new file mode 100644 index 0000000..9d982a4 --- /dev/null +++ b/COPYING.MIT @@ -0,0 +1,16 @@ +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. @@ -0,0 +1,17 @@ +meta-darwin +========== + +OpenEmbedded meta layer for mingw based SDKs + +For dylan you need to patch OE-Core with oecore.patch + +This layer depends on: + + URI: git://git.openembedded.org/openembedded-core + layers: meta + branch: master + +Layer Maintainer: Richard Purdie <richard.purdie@linuxfoundation.org> + +Please send changes to the yocto mailing list with [meta-mingw] in the subject line, +cc'ing the maintainer. diff --git a/conf/layer.conf b/conf/layer.conf new file mode 100644 index 0000000..a32fa82 --- /dev/null +++ b/conf/layer.conf @@ -0,0 +1,9 @@ +# We have a conf and classes directory, add to BBPATH +BBPATH := "${BBPATH}:${LAYERDIR}" + +# We have a packages directory, add to BBFILES +BBFILES += "${LAYERDIR}/recipes*/*/*.bb ${LAYERDIR}/recipes*/*/*.bbappend" + +BBFILE_COLLECTIONS += "meta-mingw" +BBFILE_PATTERN_meta-mingw := "^${LAYERDIR}/" +BBFILE_PRIORITY_meta-mingw = "8" diff --git a/conf/machine-sdk/i686-mingw32.conf b/conf/machine-sdk/i686-mingw32.conf new file mode 100644 index 0000000..d9d0952 --- /dev/null +++ b/conf/machine-sdk/i686-mingw32.conf @@ -0,0 +1,2 @@ +SDK_ARCH = "i686" +SDK_OS = "mingw32" diff --git a/conf/machine-sdk/x86_64-mingw32.conf b/conf/machine-sdk/x86_64-mingw32.conf new file mode 100644 index 0000000..b41b4a8 --- /dev/null +++ b/conf/machine-sdk/x86_64-mingw32.conf @@ -0,0 +1,24 @@ +SDK_ARCH = "x86_64" +SDK_OS = "mingw32" + +GCCTHREADS_mingw32 = "win32" + +PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-for-gcc = "nativesdk-mingw-w64-runtime" +PREFERRED_PROVIDER_virtual/nativesdk-libc = "nativesdk-mingw-w64-runtime" +PREFERRED_PROVIDER_virtual/nativesdk-libintl = "nativesdk-mingw-w64-runtime" +PREFERRED_PROVIDER_virtual/nativesdk-libiconv = "nativesdk-libiconv" + +USE_NLS_mingw32 = "no" + +FILES_${PN}-staticdev_append_mingw32 = " ${libdir}/*.lib" +ALLOW_EMPTY_${PN}_mingw32 = "1" + +# Do what amounts to a NOOP +SDK_PACKAGING_FUNC = "do_compile" +SDKTAROPTS_append = " -h --hard-dereference" + +SDKUSE_NLS = "no" + +SDKPKGSUFFIX = "nativesdk-mingw32" + +MACHINEOVERRIDES .= ":sdkmingw32" diff --git a/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend new file mode 100644 index 0000000..9629354 --- /dev/null +++ b/recipes-core/packagegroups/nativesdk-packagegroup-sdk-host.bbappend @@ -0,0 +1,4 @@ +RDEPENDS_${PN}_mingw32 = "\ + nativesdk-pkgconfig \ + nativesdk-libtool \ + " diff --git a/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend new file mode 100644 index 0000000..4f52762 --- /dev/null +++ b/recipes-core/packagegroups/packagegroup-cross-canadian.bbappend @@ -0,0 +1,5 @@ +RDEPENDS_${PN}_sdkmingw32 = "\ + binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} \ + gcc-cross-canadian-${TRANSLATED_TARGET_ARCH} \ + meta-environment-${TRANSLATED_TARGET_ARCH} \ + " diff --git a/recipes-core/zlib/zlib_1.2.8.bbappend b/recipes-core/zlib/zlib_1.2.8.bbappend new file mode 100644 index 0000000..2fd034b --- /dev/null +++ b/recipes-core/zlib/zlib_1.2.8.bbappend @@ -0,0 +1 @@ +EXTRA_OEMAKE_append_mingw32 = " LDSHAREDLIBC=''" diff --git a/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend b/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend new file mode 100644 index 0000000..2894041 --- /dev/null +++ b/recipes-devtools/binutils/binutils-cross-canadian_2.23.2.bbappend @@ -0,0 +1,2 @@ +EXTRA_OECONF_append_sdkmingw32 = " --disable-plugins --disable-nls" +LDFLAGS_append_sdkmingw32 = " -Wl,-static" diff --git a/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend b/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend new file mode 100644 index 0000000..030a9b9 --- /dev/null +++ b/recipes-devtools/gcc/gcc-cross-canadian_4.8.bbappend @@ -0,0 +1,6 @@ +INSANE_SKIP_${PN}_append_sdkmingw32 = " staticdev" +EXTRA_OECONF_append_sdkmingw32 = " --disable-nls" +LDFLAGS_append_sdkmingw32 = " -Wl,-static" +EXEEXT_sdkmingw32 = ".exe" +ELFUTILS_sdkmingw32 = "" +DEPENDS_remove_sdkmingw32 = "nativesdk-gettext" diff --git a/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend b/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend new file mode 100644 index 0000000..7a7ca37 --- /dev/null +++ b/recipes-devtools/gcc/gcc-crosssdk-initial_4.8.bbappend @@ -0,0 +1,8 @@ + +do_install_append_mingw32 () { + ln -s ${STAGING_DIR_TARGET}/${target_exec_prefix}/ ${D}/${exec_prefix}/${TARGET_SYS} +} + +sysroot_stage_all_append_mingw32 () { + sysroot_stage_dir ${D}${exec_prefix}/${TARGET_SYS} ${SYSROOT_DESTDIR}${exec_prefix}/${TARGET_SYS} +}
\ No newline at end of file diff --git a/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend b/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend new file mode 100644 index 0000000..77ba57f --- /dev/null +++ b/recipes-devtools/gcc/gcc-crosssdk_4.8.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_mingw32 := "${@oe_filter_out('--with-linker-hash-style=${LINKER_HASH_STYLE}', '${EXTRA_OECONF}', d)}" diff --git a/recipes-devtools/gcc/gcc-runtime_4.8.bbappend b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend new file mode 100644 index 0000000..27de4fd --- /dev/null +++ b/recipes-devtools/gcc/gcc-runtime_4.8.bbappend @@ -0,0 +1,6 @@ +FILES_libstdc++_append_mingw32 = " ${bindir}/libstdc++*.dll" +FILES_libstdc++-staticdev_append_mingw32 = " ${libdir}/libstdc++.dll.a*" +FILES_libssp_append_mingw32 = " ${bindir}/libssp*.dll" +FILES_libgomp_append_mingw32 = " ${bindir}/libgomp*.dll" + +DEPENDS_append_mingw32 = " pthreads-win32"
\ No newline at end of file diff --git a/recipes-devtools/gcc/libgcc_4.8.bbappend b/recipes-devtools/gcc/libgcc_4.8.bbappend new file mode 100644 index 0000000..dd95317 --- /dev/null +++ b/recipes-devtools/gcc/libgcc_4.8.bbappend @@ -0,0 +1,2 @@ +FILES_${PN}_append_mingw32 = " ${base_libdir}/libgcc*.dll" +FILES_${PN}-dev_append_mingw32 = " ${base_libdir}/libgcc*.a" diff --git a/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend b/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend new file mode 100644 index 0000000..4252e8d --- /dev/null +++ b/recipes-devtools/libtool/nativesdk-libtool_2.4.2.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers/epsilon.patch b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers/epsilon.patch new file mode 100644 index 0000000..10213ee --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers/epsilon.patch @@ -0,0 +1,16 @@ +mpfr 3.1.2 references these symbols and fails if they're not defined. + +Index: mingw-w64-headers/crt/float.h +=================================================================== +--- mingw-w64-headers/crt.orig/float.h 2012-07-17 11:03:12.000000000 +0000 ++++ mingw-w64-headers/crt/float.h 2013-08-13 08:23:20.000000000 +0000 +@@ -111,6 +111,9 @@ + #define FLT_ROUNDS 1 + + #define _FLOAT_H___ ++ ++ #define DBL_EPSILON __DBL_EPSILON__ ++ #define FLT_EPSILON __FLT_EPSILON__ + #endif + #endif + #endif diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_2.0.8.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_2.0.8.bb new file mode 100644 index 0000000..b12a04e --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-headers_2.0.8.bb @@ -0,0 +1,33 @@ +DESCRIPTION = "Header files from the MingGW-w64 project" +LICENSE = "ZPL" +LIC_FILES_CHKSUM = "file://../COPYING;md5=3194ff3a0d16f018784d1847bc6a3c4d" + +COMPATIBLE_HOST = ".*-mingw.*" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.gz \ + file://epsilon.patch" + +SRC_URI[md5sum] = "659e5baf45ac8e8b8526f29786ee1112" +SRC_URI[sha256sum] = "1a5a2c57f90c7f1b5eb8402a52f93de645925a8af62c2cfe748f39ce66008cf4" + +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-headers" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools nativesdk + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "" + +do_configure() { + oe_runconf +} + +do_compile() { + : +} + +do_install_append() { + # Move files to include folder where gcc-crosssdk-initial is looking + mv ${D}${exec_prefix}/${HOST_SYS}/include ${D}${exec_prefix} + rmdir ${D}${exec_prefix}/${HOST_SYS} +} diff --git a/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_2.0.8.bb b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_2.0.8.bb new file mode 100644 index 0000000..362b24a --- /dev/null +++ b/recipes-devtools/mingw-w64/nativesdk-mingw-w64-runtime_2.0.8.bb @@ -0,0 +1,41 @@ +DESCRIPTION = "Runtime libraries from MinGW-w64 project" +LICENSE = "ZPL" +LIC_FILES_CHKSUM = "file://../COPYING;md5=3194ff3a0d16f018784d1847bc6a3c4d" + +COMPATIBLE_HOST = ".*-mingw.*" + +SRC_URI = "${SOURCEFORGE_MIRROR}/project/mingw-w64/mingw-w64/mingw-w64-release/mingw-w64-v${PV}.tar.gz" +SRC_URI[md5sum] = "659e5baf45ac8e8b8526f29786ee1112" +SRC_URI[sha256sum] = "1a5a2c57f90c7f1b5eb8402a52f93de645925a8af62c2cfe748f39ce66008cf4" + +S = "${WORKDIR}/mingw-w64-v${PV}/mingw-w64-crt" +B = "${WORKDIR}/build-${TARGET_SYS}" + +inherit autotools nativesdk + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "nativesdk-mingw-w64-headers virtual/${TARGET_PREFIX}gcc-initial " + +PROVIDES += "virtual/nativesdk-libc" +PROVIDES += "virtual/nativesdk-${SDK_PREFIX}libc-initial" +PROVIDES += "virtual/nativesdk-${SDK_PREFIX}libc-for-gcc" + +# Work around pulling in eglibc for now... +PROVIDES += "virtual/nativesdk-libintl" + +STAGINGCC = "gcc-cross-initial" +STAGINGCC_class-nativesdk = "gcc-crosssdk-initial" +TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}" +PATH_prepend = "${STAGING_BINDIR_TOOLCHAIN}.${STAGINGCC}:" + +do_configure() { + oe_runconf +} + +do_install_append() { + # Move files to folder where gcc-crosssdk is looking + mv ${D}${exec_prefix}/${HOST_SYS}/lib* ${D}${exec_prefix} + rmdir ${D}${exec_prefix}/${HOST_SYS} +} +FILES_${PN} += "${exec_prefix}/libsrc" + diff --git a/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb new file mode 100644 index 0000000..d6a6284 --- /dev/null +++ b/recipes-devtools/pthreads-win32/pthreads-win32_2.9.1.bb @@ -0,0 +1,46 @@ +DESCRIPTION = "A Win32 implementation of the POSIX standard threads API" +HOMEPAGE = "http://www.sourceware.org/pthreads-win32" +LICENSE = "LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=7fbc338309ac38fefcd64b04bb903e34" + +BBCLASSEXTEND = "nativesdk" + +COMPATIBLE_HOST = ".*-mingw.*" + +## Replace dots with dashes +PVdash = "2-9-1" + +## cvs -d :pserver:anonymous@sourceware.org:/cvs/pthreads-win32 checkout pthreads +SRC_URI = "ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-${PVdash}-release.tar.gz" +SRC_URI[md5sum] = "36ba827d6aa0fa9f9ae740a35626e2e3" +SRC_URI[sha256sum] = "e6aca7aea8de33d9c8580bcb3a0ea3ec0a7ace4ba3f4e263ac7c7b66bc95fb4d" + +## Reference: http://sourceware.org/ml/pthreads-win32/2009/msg00030/w64sup.patch +#SRC_URI += "file://w64sup.patch" + +S = "${WORKDIR}/pthreads-w32-${PVdash}-release" + +INHIBIT_DEFAULT_DEPS = "1" +DEPENDS = "virtual/${SDK_PREFIX}gcc-initial libgcc virtual/libc" + +do_configure_prepend() { + ## First reset all permissions because all are executable + find . -type f -exec chmod 644 {} \; + ## Make a copy of config.h + cp config.h pthreads_win32_config.h +} + +do_compile() { + make -f GNUmakefile CROSS=${SDK_PREFIX} clean GC +} + +do_install() { + install -d -m 0755 ${D}${bindir} + install -d -m 0755 ${D}${includedir} + install -d -m 0755 ${D}${libdir} + + install -m 0644 ${S}/pthread.h ${S}/sched.h ${S}/semaphore.h ${D}${includedir}/ + + install -m 0644 ${S}/libpthreadGC2.a ${D}${libdir}/libpthread.dll.a + install -m 0644 ${S}/pthreadGC2.dll ${D}${bindir}/libpthread-2.dll +} diff --git a/recipes-extended/bzip2/bzip2/fix.patch b/recipes-extended/bzip2/bzip2/fix.patch new file mode 100644 index 0000000..a366a5d --- /dev/null +++ b/recipes-extended/bzip2/bzip2/fix.patch @@ -0,0 +1,13 @@ +Index: bzip2-1.0.6/bzip2.c +=================================================================== +--- bzip2-1.0.6.orig/bzip2.c 2010-09-10 23:04:53.000000000 +0000 ++++ bzip2-1.0.6/bzip2.c 2013-08-13 10:30:15.596120522 +0000 +@@ -128,7 +128,7 @@ + #if BZ_LCCWIN32 + # include <io.h> + # include <fcntl.h> +-# include <sys\stat.h> ++# include <sys/stat.h> + + # define NORETURN /**/ + # define PATH_SEP '\\' diff --git a/recipes-extended/bzip2/bzip2_1.0.6.bbappend b/recipes-extended/bzip2/bzip2_1.0.6.bbappend new file mode 100644 index 0000000..882147c --- /dev/null +++ b/recipes-extended/bzip2/bzip2_1.0.6.bbappend @@ -0,0 +1,4 @@ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_mingw32 = " file://fix.patch"
\ No newline at end of file diff --git a/recipes-support/gmp/gmp_5.1.1.bbappend b/recipes-support/gmp/gmp_5.1.1.bbappend new file mode 100644 index 0000000..7f25fe2 --- /dev/null +++ b/recipes-support/gmp/gmp_5.1.1.bbappend @@ -0,0 +1,3 @@ +do_install_append_mingw32 () { + ln -s libgmp.lib ${D}${libdir}/gmp.lib +}
\ No newline at end of file diff --git a/recipes-support/mpc/libmpc_1.0.1.bbappend b/recipes-support/mpc/libmpc_1.0.1.bbappend new file mode 100644 index 0000000..0d289df --- /dev/null +++ b/recipes-support/mpc/libmpc_1.0.1.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append_mingw32 = "--enable-static --disable-shared"
\ No newline at end of file diff --git a/recipes-support/mpfr/mpfr_3.1.2.bbappend b/recipes-support/mpfr/mpfr_3.1.2.bbappend new file mode 100644 index 0000000..4252e8d --- /dev/null +++ b/recipes-support/mpfr/mpfr_3.1.2.bbappend @@ -0,0 +1 @@ +EXTRA_OECONF_append_mingw32 = " --disable-shared"
\ No newline at end of file |