summaryrefslogtreecommitdiff
path: root/recipes-toolchain
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2020-02-21 07:08:06 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2020-02-25 05:29:18 +0530
commitfbaf3bc4ae8c6253f560d3da2ab4dee746cfcb09 (patch)
tree07005a072389b399b4031b2a441a3b76f3fbb5ef /recipes-toolchain
parent151e8c47edf2df402bd46eb66f50ff690d54905c (diff)
cerbero/build: Workaround MSYS trying to be too smart
Finally figured out the actual issue that I was trying to solve in f38df32d8 and 78f06dd405. Paths like `c:/foobar` (lowercase drive letter) are considered to be a POSIX path list, so `c:/foobar/` becomes `c;C:\foobar`: http://mingw.org/wiki/Posix_path_conversion This will happen anytime we try to pass a path as a command-line argument. We used to work-around this by using `to_unixpath()`, but that's just sinking deeper into dependence on broken shell behaviour. This happens now because we're passing includes in CFLAGS, CXXFLAGS, CPPFLAGS, etc. So let's just bypass the shell entirely by constructing a list. As a side-effect, this is another step towards being able to run Cerbero from a directory with spaces in it. For now, we'll convert `config_sh` to a list when not using an Autotools configure. Luckily, we don't need to pass any paths as arguments to it anyway. When running other stages, we now always use a list instead of a string. Hopefully the fallout is small and obvious for people using forks of Cerbero.
Diffstat (limited to 'recipes-toolchain')
-rw-r--r--recipes-toolchain/mingw-w64-crt.recipe2
-rw-r--r--recipes-toolchain/mingw-w64-headers.recipe2
-rw-r--r--recipes-toolchain/winpthreads.recipe14
3 files changed, 9 insertions, 9 deletions
diff --git a/recipes-toolchain/mingw-w64-crt.recipe b/recipes-toolchain/mingw-w64-crt.recipe
index 93b04e4d..31db8013 100644
--- a/recipes-toolchain/mingw-w64-crt.recipe
+++ b/recipes-toolchain/mingw-w64-crt.recipe
@@ -22,7 +22,7 @@ class Recipe(recipe.Recipe):
sysroot = os.path.join(self.config.prefix, self.host, 'sysroot')
self.configure_options += ' --host=%s' % self.host
self.configure_options += ' --with-sysroot=%s ' % sysroot
- self.make_install = 'make install DESTDIR=%s' % sysroot
+ self.make_install = ['make', 'install', 'DESTDIR=' + sysroot]
self.build_dir = os.path.join(self.config.sources,
'mingw-w64-%s' % self.version)
self.make_dir = os.path.join(self.build_dir, 'mingw-w64-crt')
diff --git a/recipes-toolchain/mingw-w64-headers.recipe b/recipes-toolchain/mingw-w64-headers.recipe
index f32b1f47..c3906853 100644
--- a/recipes-toolchain/mingw-w64-headers.recipe
+++ b/recipes-toolchain/mingw-w64-headers.recipe
@@ -16,7 +16,7 @@ class Recipe(recipe.Recipe):
self._sysroot = os.path.join(self.config.prefix, self.host, 'sysroot')
self.configure_options += ' --host=%s' % self.host
self.configure_options += ' --with-sysroot=%s ' % self._sysroot
- self.make_install = 'make install DESTDIR=%s' % self._sysroot
+ self.make_install = ['make', 'install', 'DESTDIR=' + self._sysroot]
self.build_dir = os.path.join(self.config.sources,
'mingw-w64-%s' % self.version)
self.make_dir = os.path.join(self.build_dir, 'mingw-w64-headers')
diff --git a/recipes-toolchain/winpthreads.recipe b/recipes-toolchain/winpthreads.recipe
index 3610bc80..5ea58777 100644
--- a/recipes-toolchain/winpthreads.recipe
+++ b/recipes-toolchain/winpthreads.recipe
@@ -39,7 +39,7 @@ class Recipe(recipe.Recipe):
self.host = 'x86_64-w64-mingw32'
self.sysroot = os.path.join(self.config.prefix, self.host, 'sysroot')
self.configure_options += ' --with-sysroot=%s ' % self.sysroot
- self.make_install = 'make install DESTDIR=%s' % self.sysroot
+ self.make_install = ['make', 'install', 'DESTDIR=' + self.sysroot]
self.build_dir = os.path.join(self.config.sources,
'mingw-w64-%s' % self.version)
self.make_dir = os.path.join(self.config.sources,
@@ -62,7 +62,7 @@ class Recipe(recipe.Recipe):
"RCFLAGS='-F pe-i386' DLLTOOLFLAGS='-m i386'"
host = 'i386-w64-mingw32'
libdir = "/usr/%s/lib32" % self.host
- shell.call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\
+ shell.new_call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\
(flags, libdir, libdir, host, host, self.configure_options),
self.build_dir_32)
@@ -74,13 +74,13 @@ class Recipe(recipe.Recipe):
"LD=x86_64-w64-mingw32-ld LDFLAGS=' -m64' CFLAGS=' -m64' CXXFLAGS=' -m64' "
host = 'x86_64-w64-mingw32'
libdir = "/usr/%s/lib" % self.host
- shell.call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\
+ shell.new_call('%s ../configure --bindir=%s --libdir=%s --prefix=/usr/%s --host=%s %s' %\
(flags, libdir, libdir, host, host, self.configure_options),
self.build_dir_64)
def compile(self):
- shell.call(self.make, self.build_dir_32)
- shell.call(self.make, self.build_dir_64)
+ shell.new_call(self.make, self.build_dir_32)
+ shell.new_call(self.make, self.build_dir_64)
@modify_environment
def install(self):
@@ -88,11 +88,11 @@ class Recipe(recipe.Recipe):
(self.sysroot, self.host)
libdir = "%s/usr/%s/lib32/" % (self.sysroot, self.host)
dest_winpthread_dll = os.path.join(libdir, "libwinpthread-1.dll")
- shell.call(self.make_install, self.build_dir_32)
+ shell.new_call(self.make_install, self.build_dir_32)
if os.path.exists(dest_winpthread_dll):
os.remove(dest_winpthread_dll)
shutil.move(src_winpthread_dll, dest_winpthread_dll)
- shell.call(self.make_install, self.build_dir_64)
+ shell.new_call(self.make_install, self.build_dir_64)
libdir = "%s/usr/%s/lib/" % (self.sysroot, self.host)
dest_winpthread_dll = os.path.join(libdir, "libwinpthread-1.dll")
if os.path.exists(dest_winpthread_dll):