mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
meson.build: fix build without stack-protector
Check for -fstack-protector-strong availability through has_link_argument as some compilers could missed the needed library (-lssp or -lssp_nonshared) at linking step resulting in a build failure. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
This commit is contained in:
@ -140,10 +140,6 @@ else
|
||||
test_c_args += ['-Werror=incompatible-pointer-types']
|
||||
endif
|
||||
|
||||
if get_option('buildtype') != 'plain'
|
||||
test_c_args += '-fstack-protector-strong'
|
||||
endif
|
||||
|
||||
foreach arg: test_c_args
|
||||
if cc.has_multi_arguments(arg)
|
||||
global_c_args += arg
|
||||
@ -158,6 +154,11 @@ test_link_args = [
|
||||
'-Wl,-z,relro',
|
||||
'-Wl,-z,now',
|
||||
]
|
||||
|
||||
if get_option('buildtype') != 'plain'
|
||||
test_link_args += '-fstack-protector-strong'
|
||||
endif
|
||||
|
||||
if not get_option('buildtype').startswith('debug')
|
||||
release_flags += [
|
||||
'-DG_DISABLE_CAST_CHECKS',
|
||||
|
||||
Reference in New Issue
Block a user