mirror of https://github.com/ceph/ceph
Merge PR #33056 into master
* refs/pull/33056/head: common: fix clang compile errors from cython_modules Reviewed-by: Ronen Friedman <rfriedma@redhat.com> Reviewed-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
commit
e7b7e2e36f
|
@ -113,3 +113,4 @@ bk201 Kiefer Chang <kiefer.chang@suse.com>
|
|||
alimaredia Ali Maredia <amaredia@redhat.com>
|
||||
ideepika Deepika Upadhyay <dupadhya@redhat.com>
|
||||
p-se Patrick Seidensal <pseidensal@suse.com>
|
||||
ronen-fr Ronen Friedman <rfriedma@redhat.com>
|
||||
|
|
|
@ -19,7 +19,10 @@ def filter_unsupported_flags(flags):
|
|||
if clang:
|
||||
return [f for f in flags if not (f == '-mcet' or
|
||||
f.startswith('-fcf-protection') or
|
||||
f == '-fstack-clash-protection')]
|
||||
f == '-fstack-clash-protection' or
|
||||
f == '-fno-var-tracking-assignments' or
|
||||
f == '-Wno-deprecated-register' or
|
||||
f == '-Wno-gnu-designator')]
|
||||
else:
|
||||
return flags
|
||||
|
||||
|
@ -55,7 +58,7 @@ def get_python_flags(libs):
|
|||
include_dirs=[distutils.sysconfig.get_python_inc()],
|
||||
library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
|
||||
libraries=libs + [lib.replace('-l', '') for lib in py_libs],
|
||||
extra_compile_args=distutils.sysconfig.get_config_var('CFLAGS').split(),
|
||||
extra_compile_args=filter_unsupported_flags(distutils.sysconfig.get_config_var('CFLAGS').split()),
|
||||
extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() +
|
||||
distutils.sysconfig.get_config_var('LINKFORSHARED').split()))
|
||||
|
||||
|
|
|
@ -27,7 +27,10 @@ def filter_unsupported_flags(flags):
|
|||
if clang:
|
||||
return [f for f in flags if not (f == '-mcet' or
|
||||
f.startswith('-fcf-protection') or
|
||||
f == '-fstack-clash-protection')]
|
||||
f == '-fstack-clash-protection' or
|
||||
f == '-fno-var-tracking-assignments' or
|
||||
f == '-Wno-deprecated-register' or
|
||||
f == '-Wno-gnu-designator')]
|
||||
else:
|
||||
return flags
|
||||
|
||||
|
@ -55,7 +58,7 @@ def get_python_flags(libs):
|
|||
include_dirs=[distutils.sysconfig.get_python_inc()],
|
||||
library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
|
||||
libraries=libs + [lib.replace('-l', '') for lib in py_libs],
|
||||
extra_compile_args=distutils.sysconfig.get_config_var('CFLAGS').split(),
|
||||
extra_compile_args=filter_unsupported_flags(distutils.sysconfig.get_config_var('CFLAGS').split()),
|
||||
extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() +
|
||||
distutils.sysconfig.get_config_var('LINKFORSHARED').split()))
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@ def filter_unsupported_flags(flags):
|
|||
if clang:
|
||||
return [f for f in flags if not (f == '-mcet' or
|
||||
f.startswith('-fcf-protection') or
|
||||
f == '-fstack-clash-protection')]
|
||||
f == '-fstack-clash-protection' or
|
||||
f == '-fno-var-tracking-assignments' or
|
||||
f == '-Wno-deprecated-register' or
|
||||
f == '-Wno-gnu-designator')]
|
||||
else:
|
||||
return flags
|
||||
|
||||
|
@ -55,7 +58,7 @@ def get_python_flags(libs):
|
|||
include_dirs=[distutils.sysconfig.get_python_inc()],
|
||||
library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
|
||||
libraries=libs + [lib.replace('-l', '') for lib in py_libs],
|
||||
extra_compile_args=distutils.sysconfig.get_config_var('CFLAGS').split(),
|
||||
extra_compile_args=filter_unsupported_flags(distutils.sysconfig.get_config_var('CFLAGS').split()),
|
||||
extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() +
|
||||
distutils.sysconfig.get_config_var('LINKFORSHARED').split()))
|
||||
|
||||
|
|
|
@ -19,7 +19,10 @@ def filter_unsupported_flags(flags):
|
|||
if clang:
|
||||
return [f for f in flags if not (f == '-mcet' or
|
||||
f.startswith('-fcf-protection') or
|
||||
f == '-fstack-clash-protection')]
|
||||
f == '-fstack-clash-protection' or
|
||||
f == '-fno-var-tracking-assignments' or
|
||||
f == '-Wno-deprecated-register' or
|
||||
f == '-Wno-gnu-designator')]
|
||||
return flags
|
||||
|
||||
def monkey_with_compiler(compiler):
|
||||
|
@ -58,7 +61,7 @@ def get_python_flags(libs):
|
|||
include_dirs=[distutils.sysconfig.get_python_inc()],
|
||||
library_dirs=distutils.sysconfig.get_config_vars('LIBDIR', 'LIBPL'),
|
||||
libraries=libs + [lib.replace('-l', '') for lib in py_libs],
|
||||
extra_compile_args=distutils.sysconfig.get_config_var('CFLAGS').split(),
|
||||
extra_compile_args=filter_unsupported_flags(distutils.sysconfig.get_config_var('CFLAGS').split()),
|
||||
extra_link_args=(distutils.sysconfig.get_config_var('LDFLAGS').split() +
|
||||
distutils.sysconfig.get_config_var('LINKFORSHARED').split()))
|
||||
|
||||
|
|
Loading…
Reference in New Issue