From ce6d41e85469573f54eb82ea837f9578ef37ba02 Mon Sep 17 00:00:00 2001 From: yuncang123 <1050706328@qq.com> Date: Sun, 15 Sep 2024 02:07:29 +0800 Subject: [PATCH] sync patch from 24.03-LTS fix error of cc.compiles in meson.build on aarch cased by '-fstack-clash-protection' and '-Werror' Signed-off-by: jikai --- 0017-fix-error-of-cc.compiles-on-aarch.patch | 29 +++++++++++++++++++ ...atch => 0018-add-fPIC-compile-option.patch | 0 lxc.spec | 11 +++++-- 3 files changed, 38 insertions(+), 2 deletions(-) create mode 100644 0017-fix-error-of-cc.compiles-on-aarch.patch rename 0017-add-fPIC-compile-option.patch => 0018-add-fPIC-compile-option.patch (100%) diff --git a/0017-fix-error-of-cc.compiles-on-aarch.patch b/0017-fix-error-of-cc.compiles-on-aarch.patch new file mode 100644 index 0000000..31a12e9 --- /dev/null +++ b/0017-fix-error-of-cc.compiles-on-aarch.patch @@ -0,0 +1,29 @@ +From a65709b18943fd2f5859738c5000f22e07529967 Mon Sep 17 00:00:00 2001 +From: yuncang123 <1050706328@qq.com> +Date: Sun, 15 Sep 2024 02:06:07 +0800 +Subject: [PATCH] fix-error-of-cc.compiles-on-aarch + +--- + meson.build | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/meson.build b/meson.build +index 1b2d673..1b4e369 100644 +--- a/meson.build ++++ b/meson.build +@@ -538,7 +538,11 @@ int func (void) { + } + ''' + +-have_func_strerror_r_char_p = cc.compiles(code, name : 'strerror_r() returns char *') ++ if cc.get_id() == 'clang' ++ have_func_strerror_r_char_p = cc.compiles(code, args : '-Wno-error=unused-command-line-argument', name : 'strerror_r() returns char *') ++ else ++ have_func_strerror_r_char_p = cc.compiles(code, name : 'strerror_r() returns char *') ++ endif + endif + + srcconf.set10('STRERROR_R_CHAR_P', have_func_strerror_r_char_p) +-- +2.43.0 + diff --git a/0017-add-fPIC-compile-option.patch b/0018-add-fPIC-compile-option.patch similarity index 100% rename from 0017-add-fPIC-compile-option.patch rename to 0018-add-fPIC-compile-option.patch diff --git a/lxc.spec b/lxc.spec index 6078ea3..5f763e5 100644 --- a/lxc.spec +++ b/lxc.spec @@ -1,4 +1,4 @@ -%global _release 16 +%global _release 17 %bcond isulad 1 Name: lxc @@ -25,7 +25,8 @@ Patch0013: 0013-ensure-cpuset-cgroup-built-while-writing-cgroup.proc.patch Patch0014: 0014-fix-cpuset-cgroup-error.patch Patch0015: 0015-append-mntopt-to-mntdata-if-not-found-in-mount_opt.patch Patch0016: 0016-unfreeze-freezing-container-and-bugfix-for-files.lim.patch -Patch0017: 0017-add-fPIC-compile-option.patch +Patch0017: 0017-fix-error-of-cc.compiles-on-aarch.patch +Patch0018: 0018-add-fPIC-compile-option.patch BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath BuildRequires: pkgconfig(libseccomp) @@ -215,6 +216,12 @@ meson test -C build %endif %changelog +* Mon Nov 25 2024 jikai - 5.0.2-17 +- Type: bugfix +- ID:NA +- SUG:NA +- DESC: sync patch from 24.03-LTS to fix error of cc.compiles in meson.build on aarch cased by '-fstack-clash-protection' and '-Werror' + * Wed Oct 09 2024 zhongtao - 5.0.2-16 - Type: bugfix - ID:NA -- Gitee