diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2014-09-23 19:28:55 +0200 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2014-09-23 19:35:47 +0200 |
commit | 29dce9b17bfb72f0a3b21e99addd376312c287da (patch) | |
tree | 90c54890dec51c78806fcd69e1a719e245cf6dc1 /recipes/toolchain | |
parent | abbfadd3c7691c42e71e127d98dccc755f60a626 (diff) |
toolchain: fix build when toolchain env vars are set
mingw-w64-crt and winpthreads must be built with gcc
bootstraped by gcc-core. Whith CC and friends env
variables set, it's using system toolchain instead
of the one built with gcc-core
Diffstat (limited to 'recipes/toolchain')
-rw-r--r-- | recipes/toolchain/mingw-w64.recipe | 7 | ||||
-rw-r--r-- | recipes/toolchain/winpthreads.recipe | 14 |
2 files changed, 18 insertions, 3 deletions
diff --git a/recipes/toolchain/mingw-w64.recipe b/recipes/toolchain/mingw-w64.recipe index 3cb9de36..4d872e7d 100644 --- a/recipes/toolchain/mingw-w64.recipe +++ b/recipes/toolchain/mingw-w64.recipe @@ -18,6 +18,13 @@ class Recipe(recipe.Recipe): files = ['%s/lib/%s' % (host, x) for x in self.files_crt] files.extend(['%s/lib/%s' % ('mingw', x) for x in self.files_crt]) self.files_crt = files + self.new_env['CC'] = '%s-gcc' % host + self.new_env['CXX'] = '%s-g++' % host + self.new_env['STRIP'] = '%s-strip' % host + self.new_env['RANLIB'] = '%s-ranlib' % host + self.new_env['DLLTOOL'] = '%s-dlltool' % host + self.new_env['AR'] = '%s-ar' % host + self.new_env['AS'] = '%s-as' % host files_crt = [ 'CRT_fp10.o', 'CRT_fp8.o', 'CRT_glob.o', 'CRT_noglob.o', 'binmode.o', 'crt1.o', diff --git a/recipes/toolchain/winpthreads.recipe b/recipes/toolchain/winpthreads.recipe index a109f5a9..ea1e98c0 100644 --- a/recipes/toolchain/winpthreads.recipe +++ b/recipes/toolchain/winpthreads.recipe @@ -29,7 +29,15 @@ class Recipe(recipe.Recipe): self.remotes = {'origin': '%s/%s' % (self.config.git_root, 'mingw-w64')} if self.config.target_arch == Architecture.X86: - self.host = 'i686-w64-mingw32' + host = 'i686-w64-mingw32' else: - self.host = 'x86_64-w64-mingw32' - self.configure_options += ' --host=%s' % self.host + host = 'x86_64-w64-mingw32' + self.configure_options += ' --host=%s' % host + self.new_env['CC'] = '%s-gcc' % host + self.new_env['CXX'] = '%s-g++' % host + self.new_env['STRIP'] = '%s-strip' % host + self.new_env['RANLIB'] = '%s-ranlib' % host + self.new_env['DLLTOOL'] = '%s-dlltool' % host + self.new_env['AR'] = '%s-ar' % host + self.new_env['AS'] = '%s-as' % host + |