fix error of cc.compiles in meson.build on aarch cased by '-fstack-clash-protection' and '-Werror'

This commit is contained in:
yuncang123 2024-09-15 02:07:29 +08:00
parent 67784007b3
commit 8d1dbad86c
2 changed files with 37 additions and 1 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
%global _release 15
%global _release 16
%bcond isulad 1
Name: lxc
@ -25,6 +25,7 @@ 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-fix-error-of-cc.compiles-on-aarch.patch
BuildRequires: systemd-units git libtool graphviz docbook2X doxygen chrpath
BuildRequires: pkgconfig(libseccomp)
@ -214,6 +215,12 @@ meson test -C build
%endif
%changelog
* Sun Sep 15 2024 yuanchao <1050706328@qq.com> - 5.0.2-16
- Type: bugfix
- ID:NA
- SUG:NA
- DESC: fix error of cc.compiles in meson.build on aarch cased by '-fstack-clash-protection' and '-Werror'
* Mon Jul 29 2024 jikai <jikai11@huawei.com> - 5.0.2-15
- Type: bugfix
- ID:NA