summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@osg.samsung.com>2016-10-20 17:19:25 -0300
committerThibault Saunier <thibault.saunier@osg.samsung.com>2016-10-20 17:19:25 -0300
commitc0bfb1b524897afdb97e092241390ea4a25231f3 (patch)
tree87972ea03f15a5b0c0ed78acf130fb70dd6beea6
parenta5752240a178c2c651ed10167025fad8b9c4e7bd (diff)
Revert "meson: Use the new `pic` argument on static libs"
This reverts commit a5752240a178c2c651ed10167025fad8b9c4e7bd. pic was added after 0.35 and will be present in 0.36 (meson documentation was wrong).
-rw-r--r--gst/printf/meson.build3
-rw-r--r--libs/gst/check/libcheck/meson.build3
-rw-r--r--meson.build8
3 files changed, 10 insertions, 4 deletions
diff --git a/gst/printf/meson.build b/gst/printf/meson.build
index 1b42d2a354..2a867a60e8 100644
--- a/gst/printf/meson.build
+++ b/gst/printf/meson.build
@@ -74,7 +74,6 @@ endif
printf_lib = static_library('gstprintf',
printf_sources,
include_directories : [configinc],
- c_args : printf_args,
+ c_args : printf_args + pic_args,
install : false,
- pic: true,
dependencies : [glib_dep])
diff --git a/libs/gst/check/libcheck/meson.build b/libs/gst/check/libcheck/meson.build
index f86c187bc6..4f9a92bc3e 100644
--- a/libs/gst/check/libcheck/meson.build
+++ b/libs/gst/check/libcheck/meson.build
@@ -38,5 +38,4 @@ libcheck = static_library('check',
libcheck_files,
include_directories : [ configinc, internal_check_h_inc ],
dependencies : [rt_lib, mathlib],
- c_args: gst_c_args,
- pic: true)
+ c_args: gst_c_args + pic_args)
diff --git a/meson.build b/meson.build
index c5edeae355..6fe6fa8c65 100644
--- a/meson.build
+++ b/meson.build
@@ -29,6 +29,14 @@ helpers_install_dir = libexecdir + '/gstreamer-1.0/'
cc = meson.get_compiler('c')
+# FIXME: Meson should have a way for portably adding -fPIC when needed for use
+# with static libraries that are linked into shared libraries. Or, it should
+# add it by default with an option to turn it off if needed.
+pic_args = ['-fPIC']
+if host_machine.system() == 'windows'
+ pic_args = []
+endif
+
# Ignore several spurious warnings for things gstreamer does very commonly
# If a warning is completely useless and spammy, use '/wdXXXX' to suppress it
# If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once