diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2013-04-29 01:10:15 +0200 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2013-05-06 16:03:09 +0200 |
commit | f624a90b19c91bd4eef7ae019aca0208af5df670 (patch) | |
tree | f223cbbfe6ad2bba62d1e826e70ce2c64c4b7f9e | |
parent | 8a4e1ae066fe40fc34b417e0635106dce5441db5 (diff) |
toolchain: update to mingw-w64 2.0.8 and gcc 4.7.2
-rw-r--r-- | cerbero/bootstrap/windows.py | 15 | ||||
-rw-r--r-- | recipes/gcc-core.recipe | 16 | ||||
-rw-r--r-- | recipes/gcc.recipe | 10 | ||||
-rw-r--r-- | recipes/gendef.recipe | 17 | ||||
-rw-r--r-- | recipes/mingw-w64-headers.recipe | 2 | ||||
-rw-r--r-- | recipes/mingw-w64.recipe | 4 | ||||
-rw-r--r-- | recipes/winpthreads.recipe | 35 |
7 files changed, 46 insertions, 53 deletions
diff --git a/cerbero/bootstrap/windows.py b/cerbero/bootstrap/windows.py index 97a0538..9ccfa8e 100644 --- a/cerbero/bootstrap/windows.py +++ b/cerbero/bootstrap/windows.py @@ -36,9 +36,6 @@ MINGW_TARBALL_TPL = "mingw-%s-%s-%s.tar.xz" MINGWGET_DEPS = ['msys-wget'] GNOME_FTP = 'http://ftp.gnome.org/pub/gnome/binaries/win32/' WINDOWS_BIN_DEPS = ['intltool/0.40/intltool_0.40.4-1_win32.zip'] -PTHREADS_URL = \ - 'http://downloads.sourceforge.net/project/mingw-w64/External%20binary%20'\ - 'packages%20%28Win64%20hosted%29/pthreads/pthreads-20100604.zip' class WindowsBootstraper(BootstraperBase): @@ -73,7 +70,6 @@ class WindowsBootstraper(BootstraperBase): # After mingw is beeing installed self.install_bin_deps() self.install_python_sdk() - self.install_pthreads() def check_dirs(self): if not os.path.exists(self.prefix): @@ -100,17 +96,6 @@ class WindowsBootstraper(BootstraperBase): except Exception: pass - def install_pthreads(self): - pthreadszip = os.path.join(self.prefix, 'pthreads.zip') - shell.download(PTHREADS_URL, pthreadszip) - temp = fix_winpath(os.path.abspath(tempfile.mkdtemp())) - # real pthreads stuff is in a zip file inside the previous zip file - # under mingwxx/pthreads-xx.zip - shell.unpack(pthreadszip, temp) - shell.unpack(os.path.join(temp, 'pthreads-20100604', - 'ming%s' % self.version, 'pthreads-%s.zip' % self.version), - self.prefix) - def install_python_sdk(self): m.action(_("Installing Python headers")) temp = tempfile.mkdtemp() diff --git a/recipes/gcc-core.recipe b/recipes/gcc-core.recipe index 23aacc4..09404f1 100644 --- a/recipes/gcc-core.recipe +++ b/recipes/gcc-core.recipe @@ -1,9 +1,16 @@ +from cerbero.utils import shell + + class Recipe(recipe.Recipe): name = 'gcc-core' - version = '4.6.2' + version = '4.7.2' licenses = [License.GPLv3] - configure_options = '--disable-multilib --enable-fully-dynamic-string '\ - '--with-sysroot=$CERBERO_PREFIX --enable-languages=c,c++' + configure_options = '--disable-multilib --enable-fully-dynamic-string ' \ + '--with-sysroot=$CERBERO_PREFIX ' \ + '--enable-threads=posix ' \ + '--enable-languages=c,c++ ' \ + '--enable-sjlj-exceptions ' \ + '--disable-dw2-exceptions ' make = 'make all-gcc' make_install = 'make install-gcc' use_system_libs = True @@ -25,13 +32,12 @@ class Recipe(recipe.Recipe): else: self._target = 'x86_64-w64-mingw32' self.configure_options += ' --target=%s' % self._target - self.configure_options += '--oldincludedir=%s/%s/include ' % \ + self.configure_options += ' --oldincludedir=%s/%s/include ' % \ (self.config.prefix, self._target) if self.config.target_platform == Platform.WINDOWS: self.allow_parallel_build = False def configure(self): - from cerbero.utils import shell # Create the winsup directory if self.config.target_platform == Platform.WINDOWS: winsup = os.path.join(self.build_dir, 'gcc', 'winsup', 'mingw') diff --git a/recipes/gcc.recipe b/recipes/gcc.recipe index bb70b07..902de4e 100644 --- a/recipes/gcc.recipe +++ b/recipes/gcc.recipe @@ -2,14 +2,14 @@ import shutil class Recipe(recipe.Recipe): name = 'gcc' - version = '4.6.2' + version = '4.7.2' licenses = [License.GPLv3] supports_non_src_build = True stype = SourceType.CUSTOM - deps = ['mingw-w64'] + deps = ['mingw-w64', 'winpthreads'] files_bins = ['gcc', 'cpp', 'gcov', 'jcf-dump', 'c++', 'gcj', 'g++', - 'gcc-4.6.2', 'gfortran'] + 'gcc-4.7.2', 'gfortran'] files_gcc = ['%(host)s/include/c++', '%(host)s/bin/c++%(bext)s', '%(host)s/bin/g++%(bext)s', @@ -45,8 +45,8 @@ class Recipe(recipe.Recipe): '%(host)s/lib/libsupc++.la', 'lib/libiberty.a', ] - files_lib_gcc = ['lib/gcc/%(host)s/4.6.2', - 'libexec/gcc/%(host)s/4.6.2'] + files_lib_gcc = ['lib/gcc/%(host)s/4.7.2', + 'libexec/gcc/%(host)s/4.7.2'] files_lang = ['gcc', 'cpplib'] def configure(self): diff --git a/recipes/gendef.recipe b/recipes/gendef.recipe new file mode 100644 index 0000000..1698071 --- /dev/null +++ b/recipes/gendef.recipe @@ -0,0 +1,17 @@ +class Recipe(recipe.Recipe): + name = 'gendef' + version = 'v2.0.8' + licenses = [License.LGPL] + srcdir = 'mingw-w64-tools/gendef' + files_bins = ['gendef'] + + + def prepare(self): + self.repo_dir = os.path.join(self.config.local_sources, 'mingw-w64') + self.remotes = {'origin': '%s/%s' % + (self.config.git_root, 'mingw-w64')} + if self.config.target_arch == Architecture.X86: + self.host = 'i686-w64-mingw32' + else: + self.host = 'x86_64-w64-mingw32' + self.configure_options += ' --host=%s' % self.host diff --git a/recipes/mingw-w64-headers.recipe b/recipes/mingw-w64-headers.recipe index 1e07c3e..9e4b6d8 100644 --- a/recipes/mingw-w64-headers.recipe +++ b/recipes/mingw-w64-headers.recipe @@ -1,6 +1,6 @@ class Recipe(recipe.Recipe): name = 'mingw-w64-headers' - version = 'v2.0.2' + version = 'v2.0.8' licenses = [License.LGPL] srcdir = 'mingw-w64-headers' add_host_build_target = True diff --git a/recipes/mingw-w64.recipe b/recipes/mingw-w64.recipe index 4c7b998..1001908 100644 --- a/recipes/mingw-w64.recipe +++ b/recipes/mingw-w64.recipe @@ -1,8 +1,8 @@ class Recipe(recipe.Recipe): name = 'mingw-w64' - version = 'v2.0.2' + version = 'v2.0.8' licenses = [License.LGPL] - configure_options = '--without-headers --with-tools=gendef '\ + configure_options = '--without-headers '\ '--with-sysroot=$CERBERO_PREFIX ' add_host_build_target = False deps = ['mingw-w64-headers', 'binutils', 'gcc-core'] diff --git a/recipes/winpthreads.recipe b/recipes/winpthreads.recipe index eeb102c..681c510 100644 --- a/recipes/winpthreads.recipe +++ b/recipes/winpthreads.recipe @@ -1,32 +1,17 @@ -# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python - - class Recipe(recipe.Recipe): name = 'winpthreads' - version = '20100604' + version = 'v2.0.8' licenses = [License.LGPL] - btype = BuildType.CUSTOM - stype = SourceType.CUSTOM + srcdir = 'mingw-w64-libraries/winpthreads' + configure_options = '--enable-shared --enable-static ' - files_libs = [] - files_devel = ['include/pthread.h', 'include/pthreads_win32_config.h', - 'include/sched.h', 'include/semaphore.h'] def prepare(self): - if self.config.target_platform != Platform.WINDOWS: - raise InvalidRecipeError() - + self.repo_dir = os.path.join(self.config.local_sources, 'mingw-w64') + self.remotes = {'origin': '%s/%s' % + (self.config.git_root, 'mingw-w64')} if self.config.target_arch == Architecture.X86: - self.libname = 'pthreadGC2-w32' - if self.config.target_arch == Architecture.X86_64: - self.libname = 'pthreadGC2-w64' - self.dllname = self.libname + '.dll' - self.files_libs = [self.libname] - - def install(self): - import shutil - shutil.copy(os.path.join(self.config.toolchain_prefix, 'bin', self.dllname), - os.path.join(self.config.prefix, 'bin', self.dllname)) - for f in self.files_devel: - shutil.copy(os.path.join(self.config.toolchain_prefix, self.config.host, f), - os.path.join(self.config.prefix, f)) + self.host = 'i686-w64-mingw32' + else: + self.host = 'x86_64-w64-mingw32' + self.configure_options += ' --host=%s' % self.host |