Revert "meson: Use the new `pic` argument on static libs"
authorThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 20 Oct 2016 20:19:25 +0000 (17:19 -0300)
committerThibault Saunier <thibault.saunier@osg.samsung.com>
Thu, 20 Oct 2016 20:19:25 +0000 (17:19 -0300)
This reverts commit a5752240a178c2c651ed10167025fad8b9c4e7bd.

pic was added after 0.35 and will be present in 0.36 (meson
documentation was wrong).

gst/printf/meson.build
libs/gst/check/libcheck/meson.build
meson.build

index 1b42d2a3548010bd66131c3b5dfb4cd4f0e6f82a..2a867a60e827f0da10783057e42d851c75ad6943 100644 (file)
@@ -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])
index f86c187bc695735c7f19dc72873ad0a5863bb6ea..4f9a92bc3e9f7f866626ce35d9e77ac9e1d32b31 100644 (file)
@@ -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)
index c5edeae355e0cfaa3ead20e8f1d03ede81a149b7..6fe6fa8c65a58f2f34989d36ebb8882ff954000c 100644 (file)
@@ -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