aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers.py
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2017-03-24 18:23:04 +0000
committerJon Turney <jon.turney@dronecode.org.uk>2017-04-06 22:47:15 +0100
commitcbc5064a67b2e7ff1a69d40f65c84e3d55fe2a66 (patch)
treed979d3a8289f1f5c55998591c5e9232f7a51f16d /mesonbuild/compilers.py
parentc80ca384b22547147ad1515cc6527dacc4c72fe0 (diff)
downloadmeson-cbc5064a67b2e7ff1a69d40f65c84e3d55fe2a66.zip
meson-cbc5064a67b2e7ff1a69d40f65c84e3d55fe2a66.tar.gz
meson-cbc5064a67b2e7ff1a69d40f65c84e3d55fe2a66.tar.bz2
Don't use -fPIC on Cygwin, either
Identify Cygwin-targetted gcc as sui generis (don't use -fPIC, but don't link with standard Windows libraries, either) Update tests appropriately
Diffstat (limited to 'mesonbuild/compilers.py')
-rw-r--r--mesonbuild/compilers.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py
index 6f08d98..e6be8b1 100644
--- a/mesonbuild/compilers.py
+++ b/mesonbuild/compilers.py
@@ -2309,6 +2309,7 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler):
GCC_STANDARD = 0
GCC_OSX = 1
GCC_MINGW = 2
+GCC_CYGWIN = 3
CLANG_STANDARD = 0
CLANG_OSX = 1
@@ -2324,7 +2325,7 @@ def get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion, i
sostr = ''
else:
sostr = '.' + soversion
- if gcc_type == GCC_STANDARD or gcc_type == GCC_MINGW:
+ if gcc_type in (GCC_STANDARD, GCC_MINGW, GCC_CYGWIN):
# Might not be correct for mingw but seems to work.
return ['-Wl,-soname,%s%s.%s%s' % (prefix, shlib_name, suffix, sostr)]
elif gcc_type == GCC_OSX:
@@ -2398,7 +2399,7 @@ class GnuCompiler:
return self.defines[define]
def get_pic_args(self):
- if self.gcc_type in (GCC_MINGW, GCC_OSX):
+ if self.gcc_type in (GCC_CYGWIN, GCC_MINGW, GCC_OSX):
return [] # On Window and OS X, pic is always on.
return ['-fPIC']
@@ -2796,7 +2797,7 @@ class FortranCompiler(Compiler):
return ' '.join(self.exelist)
def get_pic_args(self):
- if self.gcc_type in (GCC_MINGW, GCC_OSX):
+ if self.gcc_type in (GCC_CYGWIN, GCC_MINGW, GCC_OSX):
return [] # On Window and OS X, pic is always on.
return ['-fPIC']