GCC 11 and older do not have dangling-pointer, use cc-option to make it
work for all versions of GCC.

Fixes: 5509050b3392 ("xfs: Work around GCC 12 -Werror=dangling-pointer for 
xfs_attr_remote.o")
Signed-off-by: He Zhe <[email protected]>
---
 fs/xfs/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/Makefile b/fs/xfs/Makefile
index 8d4ad8ed4b77..49260d9b3abc 100644
--- a/fs/xfs/Makefile
+++ b/fs/xfs/Makefile
@@ -6,7 +6,7 @@
 
 ccflags-y += -I $(srctree)/$(src)              # needed for trace events
 ccflags-y += -I $(srctree)/$(src)/libxfs
-ccflags-y += -Wno-error=dangling-pointer
+ccflags-y += $(call cc-option, -Wno-error=dangling-pointer)
 
 obj-$(CONFIG_XFS_FS)           += xfs.o
 
-- 
2.32.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#11345): 
https://lists.yoctoproject.org/g/linux-yocto/message/11345
Mute This Topic: https://lists.yoctoproject.org/mt/91426697/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/linux-yocto/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to