summaryrefslogtreecommitdiffstats
path: root/CryptoPkg/Library/OpensslLib/OpensslLibAccel.inf
blob: 64684fabe0323bdd6f5e7e2d22e7817ce1f864ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
## @file
#  This module provides OpenSSL Library implementation with TLS features
#  along with performance optimized implementations of SHA1, SHA256, SHA512,
#  AESNI, VPAED, and GHASH for IA32 and X64.
#
#  Copyright (c) 2010 - 2020, Intel Corporation. All rights reserved.<BR>
#  (C) Copyright 2020 Hewlett Packard Enterprise Development LP<BR>
#  SPDX-License-Identifier: BSD-2-Clause-Patent
#
##

[Defines]
  INF_VERSION                    = 0x00010005
  BASE_NAME                      = OpensslLibAccel
  MODULE_UNI_FILE                = OpensslLibAccel.uni
  FILE_GUID                      = 96A34760-B04A-44EB-9680-AC7606E9776B
  MODULE_TYPE                    = BASE
  VERSION_STRING                 = 1.0
  LIBRARY_CLASS                  = OpensslLib
  CONSTRUCTOR                    = OpensslLibConstructor

  DEFINE OPENSSL_PATH            = openssl
  DEFINE OPENSSL_FLAGS           = -DL_ENDIAN -DOPENSSL_SMALL_FOOTPRINT -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -DOPENSSL_NO_EC -DOPENSSL_NO_ECDH -DOPENSSL_NO_ECDSA -DOPENSSL_NO_TLS1_3 -DOPENSSL_NO_SM2
  DEFINE OPENSSL_FLAGS_CONFIG    =
#
#  VALID_ARCHITECTURES           = IA32 X64
#

[Sources]
  OpensslLibConstructor.c
  $(OPENSSL_PATH)/e_os.h
  $(OPENSSL_PATH)/ms/uplink.h
# Autogenerated files list starts here
# Autogenerated files list ends here
  buildinf.h
  ossl_store.c
  rand_pool.c
#  SslNull.c
  EcSm2Null.c

[Sources.IA32]
# Autogenerated IA32 files list starts here
# Autogenerated files list ends here

# Autogenerated IA32Gcc files list starts here
# Autogenerated files list ends here

[Sources.X64]
  X64/ApiHooks.c
# Autogenerated X64 files list starts here
# Autogenerated files list ends here

# Autogenerated X64Gcc files list starts here
# Autogenerated files list ends here

[Packages]
  MdePkg/MdePkg.dec
  CryptoPkg/CryptoPkg.dec

[LibraryClasses]
  BaseLib
  DebugLib
  RngLib

[BuildOptions]
  #
  # Disables the following Visual Studio compiler warnings brought by openssl source,
  # so we do not break the build with /WX option:
  #   C4090: 'function' : different 'const' qualifiers
  #   C4132: 'object' : const object should be initialized (tls13_enc.c)
  #   C4210: nonstandard extension used: function given file scope
  #   C4244: conversion from type1 to type2, possible loss of data
  #   C4245: conversion from type1 to type2, signed/unsigned mismatch
  #   C4267: conversion from size_t to type, possible loss of data
  #   C4306: 'identifier' : conversion from 'type1' to 'type2' of greater size
  #   C4310: cast truncates constant value
  #   C4389: 'operator' : signed/unsigned mismatch (xxxx)
  #   C4700: uninitialized local variable 'name' used. (conf_sap.c(71))
  #   C4702: unreachable code
  #   C4706: assignment within conditional expression
  #   C4819: The file contains a character that cannot be represented in the current code page
  #
  MSFT:*_*_IA32_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /wd4090 /wd4132 /wd4210 /wd4244 /wd4245 /wd4267 /wd4310 /wd4389 /wd4700 /wd4702 /wd4706 /wd4819
  MSFT:*_*_X64_CC_FLAGS    = -U_WIN32 -U_WIN64 -U_MSC_VER $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /wd4090 /wd4132 /wd4210 /wd4244 /wd4245 /wd4267 /wd4306 /wd4310 /wd4700 /wd4389 /wd4702 /wd4706 /wd4819

  #
  # Disable following Visual Studio 2015 compiler warnings brought by openssl source,
  # so we do not break the build with /WX option:
  #   C4718: recursive call has no side effects, deleting
  #
  MSFT:*_VS2015x86_IA32_CC_FLAGS = /wd4718
  MSFT:*_VS2015x86_X64_CC_FLAGS  = /wd4718

  INTEL:*_*_IA32_CC_FLAGS  = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /w
  INTEL:*_*_X64_CC_FLAGS   = -U_WIN32 -U_WIN64 -U_MSC_VER -U__ICC $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) /w

  #
  # Suppress the following build warnings in openssl so we don't break the build with -Werror
  #   -Werror=maybe-uninitialized: there exist some other paths for which the variable is not initialized.
  #   -Werror=format: Check calls to printf and scanf, etc., to make sure that the arguments supplied have
  #                   types appropriate to the format string specified.
  #   -Werror=unused-but-set-variable: Warn whenever a local variable is assigned to, but otherwise unused (aside from its declaration).
  #
  GCC:*_*_IA32_CC_FLAGS    = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable
  GCC:*_*_X64_CC_FLAGS     = -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -Wno-error=maybe-uninitialized -Wno-error=format -Wno-format -Wno-error=unused-but-set-variable -DNO_MSABI_VA_FUNCS
  GCC:*_CLANGDWARF_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
  GCC:*_CLANGPDB_*_CC_FLAGS = -std=c99 -Wno-error=uninitialized -Wno-error=incompatible-pointer-types -Wno-error=pointer-sign -Wno-error=implicit-function-declaration -Wno-error=ignored-pragma-optimize
  # Revisit after switching to 3.0 branch
  GCC:*_GCC5_*_CC_FLAGS    = -Wno-unused-but-set-variable

  # suppress the following warnings in openssl so we don't break the build with warnings-as-errors:
  # 1295: Deprecated declaration <entity> - give arg types
  #  550: <entity> was set but never used
  # 1293: assignment in condition
  #  111: statement is unreachable (invariably "break;" after "return X;" in case statement)
  #   68: integer conversion resulted in a change of sign ("if (Status == -1)")
  #  177: <entity> was declared but never referenced
  #  223: function <entity> declared implicitly
  #  144: a value of type <type> cannot be used to initialize an entity of type <type>
  #  513: a value of type <type> cannot be assigned to an entity of type <type>
  #  188: enumerated type mixed with another type (i.e. passing an integer as an enum without a cast)
  # 1296: Extended constant initialiser used
  #  128: loop is not reachable - may be emitted inappropriately if code follows a conditional return
  #       from the function that evaluates to true at compile time
  #  546: transfer of control bypasses initialization - may be emitted inappropriately if the uninitialized
  #       variable is never referenced after the jump
  #    1: ignore "#1-D: last line of file ends without a newline"
  # 3017: <entity> may be used before being set (NOTE: This was fixed in OpenSSL 1.1 HEAD with
  #       commit d9b8b89bec4480de3a10bdaf9425db371c19145b, and can be dropped then.)
  XCODE:*_*_IA32_CC_FLAGS   = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -w -std=c99 -Wno-error=uninitialized
  XCODE:*_*_X64_CC_FLAGS    = -mmmx -msse -U_WIN32 -U_WIN64 $(OPENSSL_FLAGS) $(OPENSSL_FLAGS_CONFIG) -w -std=c99 -Wno-error=uninitialized