提交 4f024383 编写于 作者: C code4lala

add Wall only for openssl internal

Signed-off-by: Ncode4lala <fengziteng2@huawei.com>
Change-Id: I83ec360d829238be6afd3b4f3985d8dceac4888f
上级 489955e8
......@@ -13,8 +13,30 @@
import("//build/ohos.gni")
# Only use this to set/unset some cflags, use "platform" variable in gn template to add
# source code for Windows.
openssl_internal_cflags = [
"-Wall",
# ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
# err = strerror_r(errnum, buf, buflen);
# ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"-Wno-error=int-conversion",
# ../../third_party/openssl/crypto/bn/bn_conv.c:92:34: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 10000000000000000000 to 2313682944 [-Werror,-Wconstant-conversion]
# *lp = BN_div_word(t, BN_DEC_CONV);
# ~~~~~~~~~~~ ^~~~~~~~~~~
"-Wno-error=constant-conversion",
# ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
# if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
# ^ ~~~~~~~~~~~~~~
"-Wno-error=shift-count-overflow",
# ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined]
# # define stat _stat
# ^
# ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here
# #define stat _stat64
# ^
# 1 error generated.
"-Wno-error=macro-redefined",
]
crypto_config_common_include_dirs = [
".",
......@@ -32,7 +54,6 @@ crypto_config_common_include_dirs = [
]
crypto_config_common_cflags = [
"-Wall",
"-Wa,--noexecstack",
"-DNDEBUG",
"-DOPENSSL_BUILDING_OPENSSL",
......@@ -41,27 +62,6 @@ crypto_config_common_cflags = [
"-DENGINESDIR=\"\"",
"-DMODULESDIR=\"\"",
"-DOPENSSLDIR=\"\"",
# ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion]
# err = strerror_r(errnum, buf, buflen);
# ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"-Wno-error=int-conversion",
# ../../third_party/openssl/crypto/bn/bn_conv.c:92:34: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 10000000000000000000 to 2313682944 [-Werror,-Wconstant-conversion]
# *lp = BN_div_word(t, BN_DEC_CONV);
# ~~~~~~~~~~~ ^~~~~~~~~~~
"-Wno-error=constant-conversion",
# ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow]
# if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) {
# ^ ~~~~~~~~~~~~~~
"-Wno-error=shift-count-overflow",
# ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined]
# # define stat _stat
# ^
# ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here
# #define stat _stat64
# ^
# 1 error generated.
"-Wno-error=macro-redefined",
]
crypto_config_linux_armv4_include_dirs = [
......@@ -215,7 +215,7 @@ if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) {
config("crypto_config") {
include_dirs = crypto_config_common_include_dirs + crypto_config_current_platform_include_dirs
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + openssl_internal_cflags
}
config("crypto_config_public") {
......@@ -1367,7 +1367,7 @@ unused_variables += libdefault_mingw64_sources
config("ssl_config") {
include_dirs = crypto_config_common_include_dirs + crypto_config_current_platform_include_dirs
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags
cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + openssl_internal_cflags
}
config("ssl_config_public") {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册