diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-10-10 15:47:55 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-10-10 15:47:55 +0100 |
commit | 8be0f8c5b56c66851bb8cd67721c0b66ca78ef31 (patch) | |
tree | 4f07bee931cb365f660690c3a766ac0f65147504 | |
parent | ce6ae049e77d140b22034613ed7e98595a1a1177 (diff) |
Use host triplet in paths when cross-compiling
Use the host triplet in the build, install and configure cache file paths
when cross-compiling.
-rw-r--r-- | jhbuildrc.i686-pc-mingw32 (renamed from jhbuildrc.mingw) | 11 | ||||
-rw-r--r-- | jhbuildrc.i686-w64-mingw32 | 71 | ||||
-rw-r--r-- | jhbuildrc.x86_64-pc-cygwin (renamed from jhbuildrc.cygwin64) | 11 |
3 files changed, 83 insertions, 10 deletions
diff --git a/jhbuildrc.mingw b/jhbuildrc.i686-pc-mingw32 index 4a3bb27..cf11468 100644 --- a/jhbuildrc.mingw +++ b/jhbuildrc.i686-pc-mingw32 @@ -25,14 +25,15 @@ skip = [ 'appplewmproto', 'libAppleWM', build_policy = 'updated-deps' nopoison = True -# source checkout, build and install directories -checkoutroot = '/jhbuild/checkout' -buildroot = '/jhbuild/build-mingw' -prefix = '/jhbuild/install-mingw' os.environ['BUILD'] = 'i686-pc-cygwin' os.environ['HOST'] = 'i686-pc-mingw32' +# source checkout, build and install directories +checkoutroot = '/jhbuild/checkout' +buildroot = os.path.join('/jhbuild', os.environ['HOST'], 'build') +prefix = os.path.join('/jhbuild', os.environ['HOST'], 'install') + # configuration os.environ['ACLOCAL'] = 'aclocal -I ' + os.path.join(prefix, 'share', 'aclocal') os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') + ':' + os.path.join(prefix, 'share', 'pkgconfig') @@ -52,7 +53,7 @@ os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot os.environ['JHBUILD_BUILDROOT'] = buildroot os.environ['JHBUILD_PREFIX'] = prefix -autogenargs = '--cache-file=/jhbuild/configure-cache-mingw' +autogenargs = '--cache-file=' + os.path.join('/jhbuild', os.environ['HOST'], 'configure-cache') autogenargs += ' --build='+os.environ['BUILD'] autogenargs += ' --host='+os.environ['HOST'] diff --git a/jhbuildrc.i686-w64-mingw32 b/jhbuildrc.i686-w64-mingw32 new file mode 100644 index 0000000..6067d12 --- /dev/null +++ b/jhbuildrc.i686-w64-mingw32 @@ -0,0 +1,71 @@ +# +# jhbuildrc for building for mingw64 +# + +moduleset = '/jhbuild/xorg.modules' +modules = [ 'xwin', 'xorg' ] + +# skip building stuff which isn't appropriate for Windows target +skip = [ 'appplewmproto', 'libAppleWM', + 'videoproto', 'xf86dgaproto', 'xf86driproto', 'xf86vidmodeproto', 'dri2proto', + 'libXv', 'libXvMC', 'libXxf86dga', 'libXxf86dga', 'libXxf86vm', + 'libxkbui', 'libdrm', 'libpciaccess', + 'xvinfo', 'xdriinfo', 'xgamma', + 'xorg-drivers', + 'libGL', 'mesa-demos', + 'luit', 'sessreg', 'smproxy', 'xkbevd', 'xinit', + 'ico', 'twm', 'transset', 'x11perf', 'xwininfo' + ] +# libGL is not easily cross-compilable +# some modules don't make much sense to build for mingw64 +# some modules are provided with xming, so can be ported with some work... + +build_policy = 'updated-deps' + +os.environ['BUILD'] = 'i686-pc-cygwin' +os.environ['HOST'] = 'i686-w64-mingw32' + +# source checkout, build and install directories +checkoutroot = '/jhbuild/checkout' +buildroot = os.path.join('/jhbuild', os.environ['HOST'], 'build') +prefix = os.path.join('/jhbuild', os.environ['HOST'], 'install') + +os.environ['ACLOCAL'] = 'aclocal -I ' + os.path.join(prefix, 'share', 'aclocal') +os.environ['PKG_CONFIG_PATH'] = os.path.join(prefix, 'lib', 'pkgconfig') + ':' + os.path.join(prefix, 'share', 'pkgconfig') +# do not search in the host pkgconfig libdir +os.environ['PKG_CONFIG_LIBDIR'] = '/usr/i686-w64-mingw32/sys-root/mingw/lib/pkgconfig' + +os.environ['CC'] = 'ccache i686-w64-mingw32-gcc' +os.environ['CXX'] = 'ccache i686-w64-mingw32-g++' +os.environ['CC_FOR_BUILD'] = 'ccache gcc' + +os.environ['INSTALL'] = '/usr/local/bin/install-check' + +os.environ['CFLAGS'] = '-g -O0 -fdiagnostics-show-option' +os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot +os.environ['JHBUILD_BUILDROOT'] = buildroot +os.environ['JHBUILD_PREFIX'] = prefix + +#os.environ['V'] = '1' +#os.environ['PKG_CONFIG_DEBUG_SPEW'] = '1' + +autogenargs = '--cache-file=' + os.path.join('/jhbuild', os.environ['HOST'], 'configure-cache') +autogenargs += ' --build='+os.environ['BUILD'] +autogenargs += ' --host='+os.environ['HOST'] + +# ipv6 +# need to compile with WINVER of at least XP for getaddrinfo(), freeaddrinfo() +#autogenargs += ' --enable-ipv6' +#os.environ['CFLAGS'] += ' -DWINVER=0x0501' + +module_autogenargs['xserver'] = autogenargs + ' -disable-glx' +module_autogenargs['xserver'] = module_autogenargs['xserver'] + ' --with-builderstring="Tag: `cd ' + checkoutroot + '/xorg/xserver ; git describe | tr -d \\n`"' + +module_autogenargs['xkeyboard-config'] = autogenargs + ' --with-xkb-rules-symlink=xorg' +module_autogenargs['fontconfig'] = autogenargs + ' --enable-libxml2 --with-arch=le32d8' + +os.environ['LIBS'] = '-lws2_32' + +# AC_FUNC_STRNLEN guesses 'yes' when cross-compiling +os.environ['ac_cv_func_strnlen_working'] = 'no' + diff --git a/jhbuildrc.cygwin64 b/jhbuildrc.x86_64-pc-cygwin index ca72cf5..c0423c3 100644 --- a/jhbuildrc.cygwin64 +++ b/jhbuildrc.x86_64-pc-cygwin @@ -56,13 +56,14 @@ skip = [ 'appplewmproto', 'libAppleWM', build_policy = 'updated-deps' +os.environ['BUILD'] = 'i686-pc-cygwin' +os.environ['HOST'] = 'x86_64-pc-cygwin' + # source checkou, build and install directories checkoutroot = '/jhbuild/checkout' -buildroot = '/jhbuild/build-cygwin64' -prefix = '/jhbuild/install-cygwin64' +buildroot = os.path.join('/jhbuild', os.environ['HOST'], 'build') +prefix = os.path.join('/jhbuild', os.environ['HOST'], 'install') -os.environ['BUILD'] = 'i686-pc-cygwin' -os.environ['HOST'] = 'x86_64-pc-cygwin' os.environ['CC'] = 'ccache x86_64-pc-cygwin-gcc' os.environ['CXX'] = 'ccache x86_64-pc-cygwin-g++' os.environ['CC_FOR_BUILD'] = 'ccache gcc' @@ -77,7 +78,7 @@ os.environ['JHBUILD_CHECKOUTROOT'] = checkoutroot os.environ['JHBUILD_BUILDROOT'] = buildroot os.environ['JHBUILD_PREFIX'] = prefix -autogenargs = '--cache-file=/jhbuild/configure-cache-cygwin64' +autogenargs = '--cache-file=' + os.path.join('/jhbuild', os.environ['HOST'], 'configure-cache') autogenargs += ' --build='+os.environ['BUILD'] autogenargs += ' --host='+os.environ['HOST'] |