From 3f3b64df9928cfda09f68aa9554ed148deffd76a Mon Sep 17 00:00:00 2001 From: Radoslaw Cybulski Date: Thu, 28 Mar 2019 14:02:03 +0100 Subject: [PATCH] Fix for missing -fPIE build flag Adds -fPIE build flag to meson, which is required, because not ASLR binaries won't be allowed to run on target. Change-Id: I1f725eb4c7f39a32c43dd104255b16b0628d7a38 --- bus/meson.build | 2 ++ registryd/meson.build | 2 ++ test/meson.build | 2 ++ 3 files changed, 6 insertions(+) diff --git a/bus/meson.build b/bus/meson.build index 459e652..75c6591 100644 --- a/bus/meson.build +++ b/bus/meson.build @@ -34,6 +34,7 @@ configure_file(input: 'at-spi-dbus-bus.service.in', launcher_args = [ '-DSYSCONFDIR="@0@"'.format(atspi_sysconfdir), '-DDATADIR="@0@"'.format(atspi_datadir), + '-fPIE' ] if get_option('dbus_daemon') != 'default' @@ -69,5 +70,6 @@ executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c', include_directories: [ root_inc, include_directories('.') ], dependencies: [ gio_dep, x11_deps, app_svc_dep ], c_args: launcher_args, + link_args: '-pie', install: true, install_dir: atspi_libexecdir) diff --git a/registryd/meson.build b/registryd/meson.build index eb8236e..be0fe95 100644 --- a/registryd/meson.build +++ b/registryd/meson.build @@ -32,6 +32,8 @@ endif executable('at-spi2-registryd', registryd_sources, dependencies: registryd_deps, + c_args: '-fPIE', + link_args: '-pie', install: true, install_dir: atspi_libexecdir) diff --git a/test/meson.build b/test/meson.build index ba6a296..e564e2a 100644 --- a/test/meson.build +++ b/test/meson.build @@ -9,6 +9,8 @@ at_spi2_tool_sources = [ executable('at_spi2_tool', at_spi2_tool_sources, dependencies: [ atspi_dep, gio_dep ], + c_args: '-fPIE', + link_args: '-pie', install: true, install_dir: atspi_libexecdir) -- 2.7.4