libs/libxx: check GCC version before set special flags

Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
chao an
2023-02-21 13:16:13 +08:00
committed by Xiang Xiao
parent e28958fe5c
commit 1d41182755
+4 -1
View File
@@ -84,7 +84,10 @@ libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-shadow
# 2676 | const basic_string __temp (__first, __last, __alloc());
# | ^~~~~~
libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-maybe-uninitialized
GCCVER = $(shell $(CXX) --version | grep gcc | sed -r 's/.* ([0-9]+\.[0-9]+\.[0-9]+).*/\1/')
ifeq ($(GCCVER),12.2.1)
libcxx/src/filesystem/operations.cpp_CXXFLAGS += -Wno-maybe-uninitialized
endif
CPPSRCS += $(notdir $(wildcard libcxx/src/*.cpp))
CPPSRCS += $(notdir $(wildcard libcxx/src/experimental/*.cpp))