[oe] Cross compiling for x86_64-mingw32
Francois Retief
fgretief at gmail.com
Fri Aug 2 10:28:48 UTC 2013
Hallo,
For an upcomming project we need to build a x86_64-mingw32 SDK. So I
started
down the road to create such an SDK. I am using [1] as reference to build
OE packages.
So far I gathered that I need to create a sdk conf file for this target:
# cat ${OECORE}/meta/conf/machine_sdk/x86_64-mingw32.conf
SDK_ARCH=x86_64
SDK_OS=mingw32
Then the next steps is to make sure I can build binutils:
# SDKMACHINE=x86_64-mingw32 bitbake binutils-crosssdk
This works. The next step is to build the gcc-initial:
# SDKMACHINE=x86_64-mingw32 bitbake gcc-crosssdk-initial
But this step requires the mingw-w64 headers. Using references to recipies
from
the old oe-classic tree, I was able to craft a recipe for the
mingw-w64-headers.
recipes-devtools/mingw/mingw-w64-headers_2.0.8.bb
-----------------------------------------------------------
DESCRIPTION = "Header files from the MingGW-w64 project"
LICENSE = "ZPL"
LIC_FILES_CHKSUM = "file://../COPYING;md5=3194ff3a0d16f018784d1847bc6a3c4d"
PR = "r1"
BBCLASSEXTEND = "nativesdk"
DEFAULT_PREFERENCE = "-1"
DEFAULT_PREFERENCE_mingw32 = "1"
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-headers"
B = "${WORKDIR}/build-${TARGET_SYS}"
inherit autotools
INHIBIT_DEFAULT_DEPS = "1"
DEPENDS = ""
do_configure() {
oe_runconf
}
do_compile() {
:
}
-----------------------------------------------------------
My question is how do one get the resulting header fiels in the right place
so that
gcc-crosssdk-initial can pick it up. From the error messages I can see that
GCC is looking in
${TMPDIR}/sysroots/x86_64-nativesdk-angstromsdk-mingw32/usr/local/oecore-x86_64/sysroots/x86_64-angstromsdk-mingw32/usr/include
What is missing from the recipe? When I run the recipe, it builds fine,
but the sysroot folder is still empty.
# SDKMACHINE=x86_64-mingw32 bitbake nativesdk-mingw-w64-headers
Any suggestions is helpful.
Cheers
Francois
[1] http://www.nathancoulson.com/proj_cross.php
More information about the Openembedded-devel
mailing list