From 2a5d85f4a3300e300e1f3d48ae6538248af0449b Mon Sep 17 00:00:00 2001 From: guzhihao4 Date: Thu, 15 Sep 2022 14:43:59 +0800 Subject: [PATCH 1/3] Ignore musl build warnings to avoid too many compilation warning logs Signed-off-by: guzhihao4 --- llvm-build/Makefile | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/llvm-build/Makefile b/llvm-build/Makefile index d6e8933dc328..4c79c61266b4 100644 --- a/llvm-build/Makefile +++ b/llvm-build/Makefile @@ -83,12 +83,25 @@ endif endif ifeq ($(ARCH),aarch64) -CFLAGS = -march=armv8 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +CFLAGS = -march=armv8 -O2 -Wall \ + -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ + -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ + -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ + -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack else ifeq ($(ARCH),x86_64) -CFLAGS = -march=x86-64 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +CFLAGS = -march=x86-64 -O2 -Wall \ + -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ + -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ + -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ + -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack + else -CFLAGS = -march=armv7-a -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +CFLAGS = -march=armv7-a -O2 -Wall \ + -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ + -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ + -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ + -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack endif endif -- Gitee From 070ad1fbb5dc5434489665959303d1479dbb30a3 Mon Sep 17 00:00:00 2001 From: guzhihao4 Date: Wed, 12 Oct 2022 11:35:36 +0800 Subject: [PATCH 2/3] ignore musl build warnings in different archs Signed-off-by: guzhihao4 --- llvm-build/Makefile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/llvm-build/Makefile b/llvm-build/Makefile index 4c79c61266b4..dbcf0d094e9c 100644 --- a/llvm-build/Makefile +++ b/llvm-build/Makefile @@ -83,26 +83,21 @@ endif endif ifeq ($(ARCH),aarch64) -CFLAGS = -march=armv8 -O2 -Wall \ - -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ - -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ - -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ - -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +CFLAGS = -march=armv8 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack else ifeq ($(ARCH),x86_64) -CFLAGS = -march=x86-64 -O2 -Wall \ - -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ - -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ - -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ - -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack - +CFLAGS = -march=x86-64 -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack else -CFLAGS = -march=armv7-a -O2 -Wall \ - -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ - -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ - -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses\ - -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +CFLAGS = -march=armv7-a -O2 -Wall -fstack-protector-strong -D_FORTIFY_SOURCE=2 -Wl,-z,relro,-z,now,-z,noexecstack +endif endif + +ENABLE_WARRINGS = false +ifneq($(ENABLE_WARRINGS),true) + CFLAGS += \ + -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ + -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ + -Wno-int-conversion -Wno-ignored-attributes -Wno-parentheses endif .PHONY: $(TARGETS:%=musl_copy_for_%) -- Gitee From 6fb6942945009baa9c5263c60b13e71c5d829d23 Mon Sep 17 00:00:00 2001 From: guzhihao4 Date: Thu, 13 Oct 2022 21:16:27 +0800 Subject: [PATCH 3/3] Ignore musl build warnings in different archs Signed-off-by: guzhihao4 --- llvm-build/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm-build/Makefile b/llvm-build/Makefile index dbcf0d094e9c..b37f43b6a8bf 100644 --- a/llvm-build/Makefile +++ b/llvm-build/Makefile @@ -93,7 +93,7 @@ endif endif ENABLE_WARRINGS = false -ifneq($(ENABLE_WARRINGS),true) +ifneq ($(ENABLE_WARRINGS),true) CFLAGS += \ -Wno-bitwise-op-parentheses -Wno-missing-braces -Wno-shift-op-parentheses -Wno-logical-op-parentheses \ -Wno-unsupported-floating-point-opt -Wno-unused-variable -Wno-unused-function -Wno-string-plus-int -Wno-ignored-pragmas \ -- Gitee