]> git.proxmox.com Git - mirror_edk2.git/commitdiff
NetworkPkg: Enable MD5 while enable iSCSI
authorGao, Zhichao <zhichao.gao@intel.com>
Thu, 12 Nov 2020 05:55:49 +0000 (13:55 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Tue, 17 Nov 2020 19:26:50 +0000 (19:26 +0000)
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3003

There is a plan to make MD5 disable as default.
The new MACRO ENABLE_MD5_DEPRECATED_INTERFACES
would be introduced to enable MD5. Make the
definition ahead of the change to avoid build
error after the MACRO changed.
1. Add the NetworkBuildOptions.dsc.inc to define
the MACRO for build (support: GCC, INTEL, MSFT and
RVCT)
2. Add the BuildOption file to Network.dsc.inc

Cc: Maciej Rabeda <maciej.rabeda@linux.intel.com>
Cc: Jiaxin Wu <jiaxin.wu@intel.com>
Cc: Siyuan Fu <siyuan.fu@intel.com>
Signed-off-by: Zhichao Gao <zhichao.gao@intel.com>
Message-Id: <20201112055558.2348-5-zhichao.gao@intel.com>
[lersek@redhat.com: clean up comments in "NetworkBuildOptions.dsc.inc"]
[lersek@redhat.com: hoist "BuildOptions" above "Components" in
 "Network.dsc.inc" for bug compat with edk2-platforms]
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Siyuan Fu <siyuan.fu@intel.com>
NetworkPkg/Network.dsc.inc
NetworkPkg/NetworkBuildOptions.dsc.inc [new file with mode: 0644]

index 16f090a187ebb9062464b6bc28d70cf6a6849643..99fad885bfb3e1a0f08084ac99bfdcd884c9bdb2 100644 (file)
@@ -7,7 +7,7 @@
 # This file defines one build flag PLATFORMX64_ENABLE to support\r
 # IA32 PEI and X64 DXE platform. Its default value is FALSE.\r
 #\r
-# Copyright (c) 2019, Intel Corporation. All rights reserved.<BR>\r
+# Copyright (c) 2019 - 2020, Intel Corporation. All rights reserved.<BR>\r
 # Copyright (c) 2020, Hewlett Packard Enterprise Development LP. All rights reserved.<BR>\r
 #\r
 #    SPDX-License-Identifier: BSD-2-Clause-Patent\r
@@ -30,6 +30,9 @@
 [LibraryClasses]\r
 !include NetworkPkg/NetworkLibs.dsc.inc\r
 \r
+[BuildOptions]\r
+!include NetworkPkg/NetworkBuildOptions.dsc.inc\r
+\r
 !if $(PLATFORMX64_ENABLE) == TRUE\r
 [Components.X64]\r
 !include NetworkPkg/NetworkComponents.dsc.inc\r
diff --git a/NetworkPkg/NetworkBuildOptions.dsc.inc b/NetworkPkg/NetworkBuildOptions.dsc.inc
new file mode 100644 (file)
index 0000000..42d980d
--- /dev/null
@@ -0,0 +1,22 @@
+## @file\r
+# Network DSC include file for [BuildOptions] sections of all Architectures.\r
+#\r
+# This file can be included in the [BuildOptions*] section(s) of a platform DSC file\r
+# by using "!include NetworkPkg/NetworkBuildOptions.dsc.inc", to specify the C language\r
+# feature test macros (eg., API deprecation macros) according to the flags described\r
+# in "NetworkDefines.dsc.inc".\r
+#\r
+# Supported tool chain families: "GCC", "INTEL", "MSFT", "RVCT".\r
+#\r
+# Copyright (c) 2020, Intel Corporation. All rights reserved.<BR>\r
+#\r
+#    SPDX-License-Identifier: BSD-2-Clause-Patent\r
+#\r
+##\r
+\r
+!if $(NETWORK_ISCSI_ENABLE) == TRUE\r
+  MSFT:*_*_*_CC_FLAGS = /D ENABLE_MD5_DEPRECATED_INTERFACES\r
+  INTEL:*_*_*_CC_FLAGS = /D ENABLE_MD5_DEPRECATED_INTERFACES\r
+  GCC:*_*_*_CC_FLAGS = -D ENABLE_MD5_DEPRECATED_INTERFACES\r
+  RVCT:*_*_*_CC_FLAGS = -DENABLE_MD5_DEPRECATED_INTERFACES\r
+!endif\r