From c443e33a3a46c8e8aba260e4554fadffa655efcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Tue, 30 Jan 2018 20:32:44 +0000 Subject: [PATCH] meson: use built-in pic kwarg when building static helper libs instead of passing -fPIC manually. --- gst-libs/gst/audio/meson.build | 10 ++++++---- meson.build | 8 -------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build index 11b4485b38..5074ddfed3 100644 --- a/gst-libs/gst/audio/meson.build +++ b/gst-libs/gst/audio/meson.build @@ -99,12 +99,12 @@ simd_dependencies = [] if have_sse audio_resampler_sse = static_library('audio_resampler_sse', ['audio-resampler-x86-sse.c', gstaudio_h], - c_args : gst_plugins_base_args + [sse_args] + [pic_args], + c_args : gst_plugins_base_args + [sse_args], include_directories : [configinc, libsinc], dependencies : [gst_base_dep], + pic : true, install : false ) - simd_cargs += ['-DHAVE_SSE'] simd_dependencies += audio_resampler_sse endif @@ -112,9 +112,10 @@ endif if have_sse2 audio_resampler_sse2 = static_library('audio_resampler_sse2', ['audio-resampler-x86-sse2.c', gstaudio_h], - c_args : gst_plugins_base_args + [sse2_args] + [pic_args], + c_args : gst_plugins_base_args + [sse2_args], include_directories : [configinc, libsinc], dependencies : [gst_base_dep], + pic : true, install : false ) @@ -125,9 +126,10 @@ endif if have_sse41 audio_resampler_sse41 = static_library('audio_resampler_sse41', ['audio-resampler-x86-sse41.c', gstaudio_h], - c_args : gst_plugins_base_args + [sse41_args] + [pic_args], + c_args : gst_plugins_base_args + [sse41_args], include_directories : [configinc, libsinc], dependencies : [gst_base_dep], + pic : true, install : false ) diff --git a/meson.build b/meson.build index 80930ce122..073a401798 100644 --- a/meson.build +++ b/meson.build @@ -215,14 +215,6 @@ have_sse = cc.has_argument(sse_args) have_sse2 = cc.has_argument(sse2_args) have_sse41 = cc.has_argument(sse41_args) -# 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 - if gst_dep.type_name() == 'internal' gst_proj = subproject('gstreamer')