From 299324ee4aecc795552b0f830634efd167be33a5 Mon Sep 17 00:00:00 2001 From: Humberto Dias Date: Wed, 21 Feb 2024 16:20:17 -0300 Subject: [PATCH] add parameter have_pic "Position-Independent Code (PIC)" if is not a cross_build --- meson.build | 1 + src/r-tech1/libs/dumb/meson.build | 3 ++- src/r-tech1/libs/gme/meson.build | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 45071c617..dadf2751b 100644 --- a/meson.build +++ b/meson.build @@ -15,6 +15,7 @@ sdl_graphics_dependency = [] sdl_graphics_library = [] yaml_cpp_dependency = [] yaml_cpp_library = [] +have_pic = not meson.is_cross_build() # Not supported in mingw if not meson.is_cross_build() diff --git a/src/r-tech1/libs/dumb/meson.build b/src/r-tech1/libs/dumb/meson.build index b269be34b..8ff5faed3 100644 --- a/src/r-tech1/libs/dumb/meson.build +++ b/src/r-tech1/libs/dumb/meson.build @@ -91,5 +91,6 @@ dumb_includes = include_directories('./include') dumb_library = static_library('dumb', dumb_source, include_directories: [includes, dumb_includes], dependencies: [zlib_dependency], - c_args: ['-w'] + c_args: ['-w'], + pic: have_pic ) diff --git a/src/r-tech1/libs/gme/meson.build b/src/r-tech1/libs/gme/meson.build index 63987b53a..0e4dc8f5c 100644 --- a/src/r-tech1/libs/gme/meson.build +++ b/src/r-tech1/libs/gme/meson.build @@ -52,5 +52,6 @@ gme_source = [ gme_library = static_library('gme', gme_source, include_directories: [includes, '.'], dependencies: [zlib_dependency], - cpp_args: ['-w'] + cpp_args: ['-w'], + pic: have_pic )