VirtualBox

source: vbox/trunk/src/libs/openssl-3.1.7/Config.kmk@ 107044

Last change on this file since 107044 was 106683, checked in by vboxsync, 4 weeks ago

/Config.kmk,*.kmk: Changed the LIBS properties on all templates to LATE_LIBS to help solve library ordering issues. Only tested on win.amd64. jiraref:1253

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 19.0 KB
Line 
1# $Id: Config.kmk 106683 2024-10-25 10:28:28Z vboxsync $
2## @file
3# OpenSSL kBuild Configuration file.
4#
5
6#
7# Copyright (C) 2006-2024 Oracle and/or its affiliates.
8#
9# This file is part of VirtualBox base platform packages, as
10# available from https://www.virtualbox.org.
11#
12# This program is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License
14# as published by the Free Software Foundation, in version 3 of the
15# License.
16#
17# This program is distributed in the hope that it will be useful, but
18# WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, see <https://www.gnu.org/licenses>.
24#
25# SPDX-License-Identifier: GPL-3.0-only
26#
27
28# Include the top-level configure file.
29ifndef VBOX_ROOT_CONFIG_KMK_INCLUDED
30 include $(PATH_ROOT)/Config.kmk
31endif
32
33# Figure out openssl perl asm style for the target
34VBOX_CRYPTO_ASM_SCHEME := portme
35if1of ($(KBUILD_TARGET), freebsd linux netbsd openbsd solaris)
36 VBOX_CRYPTO_ASM_SCHEME := elf
37else ifeq ($(KBUILD_TARGET),darwin)
38 VBOX_CRYPTO_ASM_SCHEME := macosx
39else ifeq ($(KBUILD_TARGET),win)
40 VBOX_CRYPTO_ASM_SCHEME := nasm
41endif
42
43# Can't use relative paths when dealing with sub-makefiles.
44VBOX_PATH_OPENSSL := $(PATH_ROOT)/src/libs/openssl-3.1.7
45VBOX_PATH_CRYPTO := $(VBOX_PATH_OPENSSL)/crypto
46VBOX_PATH_CRYPTO_GENASM := $(VBOX_PATH_CRYPTO)/genasm-$(VBOX_CRYPTO_ASM_SCHEME)
47VBOX_PATH_CRYPTO_AES := $(VBOX_PATH_CRYPTO)/aes
48VBOX_PATH_CRYPTO_BN := $(VBOX_PATH_CRYPTO)/bn
49VBOX_PATH_CRYPTO_CHACHA := $(VBOX_PATH_CRYPTO)/chacha
50VBOX_PATH_CRYPTO_EC := $(VBOX_PATH_CRYPTO)/ec
51VBOX_PATH_CRYPTO_MD5 := $(VBOX_PATH_CRYPTO)/md5
52VBOX_PATH_CRYPTO_MODES := $(VBOX_PATH_CRYPTO)/modes
53VBOX_PATH_CRYPTO_POLY1305 := $(VBOX_PATH_CRYPTO)/poly1305
54VBOX_PATH_CRYPTO_RC4 := $(VBOX_PATH_CRYPTO)/rc4
55VBOX_PATH_CRYPTO_SHA := $(VBOX_PATH_CRYPTO)/sha
56VBOX_PATH_CRYPTO_DES := $(VBOX_PATH_CRYPTO)/des
57VBOX_PATH_CRYPTO_CAMELLIA := $(VBOX_PATH_CRYPTO)/camellia
58VBOX_INST_CRYPTO_HEADERS := obj/$(if-expr "$(CURSUBDIR)" == ".",,$(CURSUBDIR)/)crypto-3.1.7-headers/include/openssl/
59VBOX_PATH_CRYPTO_HEADERS := $(abspath $(PATH_OUT))/$(patsubst %/,%,$(VBOX_INST_CRYPTO_HEADERS))
60VBOX_PATH_CRYPTO_PROVIDERS := $(VBOX_PATH_OPENSSL)/providers
61
62# Enable asm implementation of crypto.
63if1of ($(KBUILD_TARGET_ARCH), x86 amd64)
64 ifneq ($(VBOX_CRYPTO_ASM_SCHEME),portme)
65 ifn1of ($(KBUILD_TARGET), ) # Selective exclusion for testing. scm:ignore-empty-if1of-set
66 VBOX_WITH_CRYPTO_ASM = 1
67 endif
68 endif
69endif
70
71#
72# A target for installer the header files into a include directory
73# for the build. We have to put this in the Config.kmk because it
74# is required when running make from a sub directory too.
75#
76INSTALLS += crypto-headers
77crypto-headers_TEMPLATE := DUMMY
78crypto-headers_INST = $(VBOX_INST_CRYPTO_HEADERS)
79crypto-headers_MODE := a+r,u+w
80crypto-headers_DEFPATH = $(VBOX_PATH_OPENSSL)
81crypto-headers_SOURCES := \
82 include/openssl/aes.h=>aes.h \
83 include/openssl/asn1err.h=>asn1err.h \
84 include/openssl/asn1_mac.h=>asn1_mac.h \
85 include/openssl/async.h=>async.h \
86 include/openssl/asyncerr.h=>asyncerr.h \
87 include/openssl/bioerr.h=>bioerr.h \
88 include/openssl/blowfish.h=>blowfish.h \
89 include/openssl/bn.h=>bn.h \
90 include/openssl/bnerr.h=>bnerr.h \
91 include/openssl/buffer.h=>buffer.h \
92 include/openssl/buffererr.h=>buffererr.h \
93 include/openssl/camellia.h=>camellia.h \
94 include/openssl/cast.h=>cast.h \
95 include/openssl/cmac.h=>cmac.h \
96 include/openssl/cmp_util.h=>cmp_util.h \
97 include/openssl/cmperr.h=>cmperr.h \
98 include/openssl/cmserr.h=>cmserr.h \
99 include/openssl/comp.h=>comp.h \
100 include/openssl/comperr.h=>comperr.h \
101 include/openssl/conferr.h=>conferr.h \
102 include/openssl/conf_api.h=>conf_api.h \
103 include/openssl/conftypes.h=>conftypes.h \
104 include/openssl/core.h=>core.h \
105 include/openssl/core_dispatch.h=>core_dispatch.h \
106 include/openssl/core_names.h=>core_names.h \
107 include/openssl/core_object.h=>core_object.h \
108 include/openssl/crmferr.h=>crmferr.h \
109 include/openssl/cryptoerr.h=>cryptoerr.h \
110 include/openssl/cryptoerr_legacy.h=>cryptoerr_legacy.h \
111 include/openssl/cterr.h=>cterr.h \
112 include/openssl/decoder.h=>decoder.h \
113 include/openssl/decodererr.h=>decodererr.h \
114 include/openssl/des.h=>des.h \
115 include/openssl/dh.h=>dh.h \
116 include/openssl/dherr.h=>dherr.h \
117 include/openssl/dsa.h=>dsa.h \
118 include/openssl/dsaerr.h=>dsaerr.h \
119 include/openssl/dtls1.h=>dtls1.h \
120 include/openssl/ebcdic.h=>ebcdic.h \
121 include/openssl/ec.h=>ec.h \
122 include/openssl/ecerr.h=>ecerr.h \
123 include/openssl/ecdh.h=>ecdh.h \
124 include/openssl/ecdsa.h=>ecdsa.h \
125 include/openssl/encoder.h=>encoder.h \
126 include/openssl/encodererr.h=>encodererr.h \
127 include/openssl/engine.h=>engine.h \
128 include/openssl/engineerr.h=>engineerr.h \
129 include/openssl/esserr.h=>esserr.h \
130 include/openssl/evp.h=>evp.h \
131 include/openssl/evperr.h=>evperr.h \
132 include/openssl/e_os2.h=>e_os2.h \
133 include/openssl/fips_names.h=>fips_names.h \
134 include/openssl/hmac.h=>hmac.h \
135 include/openssl/http.h=>http.h \
136 include/openssl/httperr.h=>httperr.h \
137 include/openssl/idea.h=>idea.h \
138 include/openssl/kdf.h=>kdf.h \
139 include/openssl/kdferr.h=>kdferr.h \
140 include/openssl/macros.h=>macros.h \
141 include/openssl/md2.h=>md2.h \
142 include/openssl/md4.h=>md4.h \
143 include/openssl/md5.h=>md5.h \
144 include/openssl/mdc2.h=>mdc2.h \
145 include/openssl/modes.h=>modes.h \
146 include/openssl/objects.h=>objects.h \
147 include/openssl/objectserr.h=>objectserr.h \
148 include/openssl/obj_mac.h=>obj_mac.h \
149 include/openssl/ocsperr.h=>ocsperr.h \
150 include/openssl/opensslconf.h=>opensslconf.h \
151 include/openssl/ossl_typ.h=>ossl_typ.h \
152 include/openssl/params.h=>params.h \
153 include/openssl/param_build.h=>param_build.h \
154 include/openssl/pem.h=>pem.h \
155 include/openssl/pemerr.h=>pemerr.h \
156 include/openssl/pem2.h=>pem2.h \
157 include/openssl/pkcs12err.h=>pkcs12err.h \
158 include/openssl/pkcs7err.h=>pkcs7err.h \
159 include/openssl/prov_ssl.h=>prov_ssl.h \
160 include/openssl/proverr.h=>proverr.h \
161 include/openssl/provider.h=>provider.h \
162 include/openssl/rand.h=>rand.h \
163 include/openssl/randerr.h=>randerr.h \
164 include/openssl/rc2.h=>rc2.h \
165 include/openssl/rc4.h=>rc4.h \
166 include/openssl/rc5.h=>rc5.h \
167 include/openssl/ripemd.h=>ripemd.h \
168 include/openssl/rsa.h=>rsa.h \
169 include/openssl/rsaerr.h=>rsaerr.h \
170 include/openssl/self_test.h=>self_test.h \
171 include/openssl/seed.h=>seed.h \
172 include/openssl/sha.h=>sha.h \
173 include/openssl/srtp.h=>srtp.h \
174 include/openssl/sslerr.h=>sslerr.h \
175 include/openssl/sslerr_legacy.h=>sslerr_legacy.h \
176 include/openssl/ssl2.h=>ssl2.h \
177 include/openssl/ssl3.h=>ssl3.h \
178 include/openssl/stack.h=>stack.h \
179 include/openssl/store.h=>store.h \
180 include/openssl/storeerr.h=>storeerr.h \
181 include/openssl/symhacks.h=>symhacks.h \
182 include/openssl/tls1.h=>tls1.h \
183 include/openssl/trace.h=>trace.h \
184 include/openssl/ts.h=>ts.h \
185 include/openssl/tserr.h=>tserr.h \
186 include/openssl/txt_db.h=>txt_db.h \
187 include/openssl/types.h=>types.h \
188 include/openssl/uierr.h=>uierr.h \
189 include/openssl/whrlpool.h=>whrlpool.h \
190 include/openssl/x509err.h=>x509err.h \
191 include/openssl/x509v3err.h=>x509v3err.h \
192 \
193 openssl-mangling.h=>openssl-mangling.h \
194 \
195 gen-includes/openssl/asn1.h=>asn1.h \
196 gen-includes/openssl/asn1t.h=>asn1t.h \
197 gen-includes/openssl/bio.h=>bio.h \
198 gen-includes/openssl/cmp.h=>cmp.h \
199 gen-includes/openssl/cms.h=>cms.h \
200 gen-includes/openssl/conf.h=>conf.h \
201 gen-includes/openssl/configuration.h=>configuration.h \
202 gen-includes/openssl/crmf.h=>crmf.h \
203 gen-includes/openssl/crypto.h=>crypto.h \
204 gen-includes/openssl/ct.h=>ct.h \
205 gen-includes/openssl/err.h=>err.h \
206 gen-includes/openssl/ess.h=>ess.h \
207 gen-includes/openssl/fipskey.h=>fipskey.h \
208 gen-includes/openssl/lhash.h=>lhash.h \
209 gen-includes/openssl/ocsp.h=>ocsp.h \
210 gen-includes/openssl/opensslv.h=>opensslv.h \
211 gen-includes/openssl/pkcs12.h=>pkcs12.h \
212 gen-includes/openssl/pkcs7.h=>pkcs7.h \
213 gen-includes/openssl/safestack.h=>safestack.h \
214 gen-includes/openssl/srp.h=>srp.h \
215 gen-includes/openssl/ssl.h=>ssl.h \
216 gen-includes/openssl/ui.h=>ui.h \
217 gen-includes/openssl/x509.h=>x509.h \
218 gen-includes/openssl/x509_vfy.h=>x509_vfy.h \
219 gen-includes/openssl/x509v3.h=>x509v3.h
220
221## Workaround for GCC 3.3.x or older always warning about '\#pragma once' being obsolete.
222#
223# We edit the headers during installation and qualifies the \#pragma once with
224# RT_WITHOUT_PRAGMA_ONCE like we do for our own headers (defined root templates).
225#
226# 1=<src>, 2=<dst>, 3=<target>, 4=<flags>, 5=install|stage
227# context vars: uid, gid, mode
228#
229if "$(VBOX_GCC_VERSION_CC)" < 30400 && "$(KBUILD_TARGET)" != "win"
230 define crypto-headers_INSTALLER
231 $$(RM) -f -- "$(2)"
232 $$(SED) -e 's/^\([#][[:space:]]*\)pragma[[:space:]][[:space:]]*once.*/\1ifndef RT_WITHOUT_PRAGMA_ONCE\n\1 pragma once\n\1endif/' \
233 --output "$(2)" "$(1)"
234 $(if $(mode),$(CHMOD) "$(mode)" -- "$(2)",)
235 endef
236endif
237
238#
239# The templates used for the crypo lib and all its sublibraries.
240#
241TEMPLATE_LibCrypto = Template for the OpenSSL crypto library.
242TEMPLATE_LibCrypto_EXTENDS = VBoxR3RuntimeDllNonPedantic
243ifneq ($(KBUILD_TARGET),win)
244 TEMPLATE_LibCrypto_ASTOOL.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(VBOX_GCC_TOOL)
245 TEMPLATE_LibCrypto_ASTOOL.$(KBUILD_TARGET).x86 = $(VBOX_GCC_TOOL)
246 TEMPLATE_LibCrypto_ASFLAGS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH) = $(VBOX_$(VBOX_GCC_TOOL)_ASFLAGS.$(KBUILD_TARGET).$(KBUILD_TARGET_ARCH))
247 TEMPLATE_LibCrypto_ASFLAGS.$(KBUILD_TARGET).x86 = $(VBOX_$(VBOX_GCC_TOOL)_ASFLAGS.$(KBUILD_TARGET).x86)
248 TEMPLATE_LibCrypto_ASFLAGS = -include $(VBOX_PATH_OPENSSL)/openssl-mangling.h
249 TEMPLATE_LibCrypto_ASDEFS = $(NO_SUCH_VARIABLE)
250 TEMPLATE_LibCrypto_ASDEFS.darwin = OPENSSL_MANGLE_ASM
251 if "$(VBOX_AS_VERSION)" != "" && "$(VBOX_AS_VERSION)" vlt "GNU assembler version 2.20"
252 TEMPLATE_LibCrypto_ASFLAGS.solaris = -include $(VBOX_PATH_OPENSSL)/crypto/old-solaris-asm-trick.h
253 endif
254endif
255
256TEMPLATE_LibCrypto_DEFS = \
257 $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_DEFS) \
258 VBOX_SUFF_DLL=$(VBOX_SUFF_DLL) \
259 DSO_NONE \
260 OPENSSL_USE_NODELETE \
261 OPENSSL_PIC \
262 OPENSSL_IA32_SSE2 \
263 OPENSSL_BUILDING_OPENSSL
264ifdef VBOX_WITH_CRYPTO_ASM
265 TEMPLATE_LibCrypto_DEFS += \
266 OPENSSL_BN_ASM_MONT \
267 OPENSSL_BN_ASM_GF2m \
268 SHA1_ASM \
269 SHA256_ASM \
270 SHA512_ASM \
271 RC4_ASM \
272 MD5_ASM \
273 AES_ASM \
274 VPAES_ASM \
275 ECP_NISTZ256_ASM \
276 PADLOCK_ASM \
277 POLY1305_ASM
278 TEMPLATE_LibCrypto_DEFS.amd64 = \
279 BSAES_ASM \
280 GHASH_ASM \
281 KECCAK1600_ASM \
282 OPENSSL_BN_ASM_MONT5 \
283 X25519_ASM
284else
285 TEMPLATE_LibCrypto_DEFS += \
286 OPENSSL_NO_ASM
287endif
288if1of ($(KBUILD_TARGET), linux solaris)
289 TEMPLATE_LibCrypto_DEFS += \
290 _REENTRANT \
291 _GNU_SOURCE
292endif
293ifeq ($(sort $(filter -fPIC,$(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS))),-fPIC)
294 TEMPLATE_LibCrypto_DEFS += \
295 OPENSSL_PIC
296endif
297TEMPLATE_LibCrypto_DEFS.amd64 += \
298 MD32_REG_T=int
299ifeq ($(KBUILD_TARGET),win)
300 TEMPLATE_LibCrypto_DEFS += \
301 OPENSSL_SYSNAME_WIN32 \
302 OPENSSL_RAND_SEED_OS
303 # Exclude WinCrypt.h, causes trouble all over the place
304 TEMPLATE_LibCrypto_DEFS += \
305 NOCRYPT
306endif
307if1of ($(KBUILD_TARGET_ARCH), x86 amd64 arm64)
308 TEMPLATE_LibCrypto_DEFS += \
309 L_ENDIAN
310else
311 TEMPLATE_LibCrypto_DEFS += \
312 B_ENDIAN
313endif
314ifeq ($(KBUILD_TARGET),os2)
315 TEMPLATE_LibCrypto_DEFS += \
316 OPENSSL_NO_SECURE_MEMORY
317endif
318if defined(VBOX_WITH_PARFAIT) #&& VBOX_GCC_VERSION_CC == 50301
319 TEMPLATE_LibCrypto_DEFS += __STDC_NO_ATOMICS__
320endif
321# Enable for running with valgrind:
322#TEMPLATE_LibCrypto_DEFS += PURIFY
323
324TEMPLATE_LibCrypto_CFLAGS = $(filter-out $(VBOX_GCC_fvisibility-hidden),$(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS))
325TEMPLATE_LibCrypto_CFLAGS.win = $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.win)
326TEMPLATE_LibCrypto_CFLAGS.win += -wd4305 # asn1_lib.c(455) : warning C4305: 'type cast' : truncation from 'const unsigned char *' to 'unsigned long'
327TEMPLATE_LibCrypto_CFLAGS.win += -wd4306 # tasn_new.c(338) : warning C4306: 'type cast' : conversion from 'int' to 'ASN1_VALUE *' of greater size
328TEMPLATE_LibCrypto_CFLAGS.win += -wd4701 # tasn_dec.c(840) : warning C4701: potentially uninitialized local variable 'buf' used
329TEMPLATE_LibCrypto_CFLAGS.win += -wd4101 # bn_asm.c(619) : warning C4101: 'bh' : unreferenced local variable
330TEMPLATE_LibCrypto_CFLAGS.win += -wd4206 # e_camellia.c(120) : warning C4206: nonstandard extension used : translation unit is empty
331TEMPLATE_LibCrypto_CFLAGS.win += -wd4232 # warning C4232: nonstandard extension used : 'malloc_func' : address of dllimport 'malloc' is not stati c, identity not guaranteed
332TEMPLATE_LibCrypto_CFLAGS.win += -wd4146 # x_long.c(79) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
333TEMPLATE_LibCrypto_CFLAGS.win += -wd4130 # b_addr.c(750) : warning C4130: '==' : logical operation on address of string constant
334TEMPLATE_LibCrypto_CFLAGS.win += -wd4090 # ssl_lib.c(229) : warning C4090: 'function' : different 'const' qualifiers
335TEMPLATE_LibCrypto_CFLAGS.win += -wd4310 # bss_acpt.c(223) : warning C4310: cast truncates constant value [(int)INVALID_SOCKET]
336TEMPLATE_LibCrypto_CFLAGS.win += -wd4210 # bn_exp.c(913) : warning C4210: nonstandard extension used : function given file scope
337TEMPLATE_LibCrypto_CFLAGS.win += -wd4067 # mem.c(14) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
338TEMPLATE_LibCrypto_CFLAGS.win += -wd4133 # ssl_local.h(2881): warning C4133: 'function': incompatible types - from 'volatile int *' to 'volatile LONG64 *'
339TEMPLATE_LibCrypto_CFLAGS.win += -wd4047 #threads_win.c(205): warning C4047: 'return': 'CRYPTO_THREAD_ID' differs in levels of indirection from 'DWORD'
340
341if1of ($(VBOX_VCC_TOOL_STEM), VCC120)
342 TEMPLATE_LibCrypto_CFLAGS.win += -wd4005 # sdk\v7.1\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition
343endif
344TEMPLATE_LibCrypto_CFLAGS.freebsd = -std=gnu99
345
346TEMPLATE_LibCrypto_INCS := \
347 $(dir $(VBOX_PATH_CRYPTO_HEADERS)) \
348 $(VBOX_PATH_OPENSSL) \
349 $(VBOX_PATH_OPENSSL)/include \
350 $(VBOX_PATH_OPENSSL)/providers/common/include \
351 $(VBOX_PATH_OPENSSL)/providers/implementations/include \
352 $(VBOX_PATH_OPENSSL)/gen-includes \
353 $(VBOX_PATH_CRYPTO)/include \
354 $(VBOX_PATH_CRYPTO_MODES) \
355 $(VBOX_PATH_CRYPTO)/ec/curve448 \
356 $(VBOX_PATH_CRYPTO)/ec/curve448/arch_32 \
357 $(patsubst %/openssl,%,$(VBOX_PATH_CRYPTO_HEADERS))
358
359#TEMPLATE_LibCrypto_INTERMEDIATES = $($(crypto-headers)_1_STAGE_TARGET)
360TEMPLATE_LibCrypto_INTERMEDIATES := \
361 $(foreach f,$(crypto-headers_SOURCES),$(VBOX_PATH_CRYPTO_HEADERS)/$(lastword $(subst =>, ,$(f))))
362
363# Same as LibCrypto except that we don't install these libraries.
364TEMPLATE_SubLibCrypto := Template for the OpenSSL crypto sub-libraries.
365TEMPLATE_SubLibCrypto_EXTENDS := LibCrypto
366TEMPLATE_SubLibCrypto_INSTTYPE := none
367
368# Somewhat similar to LibCrypto.
369TEMPLATE_LibCryptoTstExe = Template for the OpenSSL crypto testcases.
370TEMPLATE_LibCryptoTstExe_EXTENDS = VBoxR3TstExe
371TEMPLATE_LibCryptoTstExe_DEFS = $(TEMPLATE_VBoxR3TstExe_DEFS) $(filter-out $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_DEFS) IN_RT_R3,$(TEMPLATE_LibCrypto_DEFS))
372TEMPLATE_LibCryptoTstExe_INCS = $(TEMPLATE_LibCrypto_INCS) $(TEMPLATE_VBoxR3TstExe_INCS)
373ifeq ($(KBUILD_TARGET),win)
374 TEMPLATE_LibCryptoTstExe_CFLAGS = $(filter-out $(VBOX_VCC_WERR), $(TEMPLATE_VBoxR3TstExe_CXXFLAGS)) $(VBOX_VCC_NON_PEDANTIC)
375else
376 TEMPLATE_LibCryptoTstExe_CFLAGS = $(filter-out $(VBOX_GCC_PEDANTIC_C), $(TEMPLATE_VBoxR3TstExe_CFLAGS)) $(VBOX_GCC_NON_PEDANTIC_C)
377endif
378TEMPLATE_LibCryptoTstExe_LATE_LIBS = $(PATH_STAGE_LIB)/VBox-libcrypto$(VBOX_SUFF_LIB) $(TEMPLATE_VBoxR3TstExe_LATE_LIBS)
379
380
381ifdef VBOX_WITH_BLD_RTSIGNTOOL_SIGNING
382 #
383 # Build program versions of LibCrypto and SubLibCrypto for bldRTSignTool.
384 #
385 TEMPLATE_VBoxLibCryptoBldProg = Build program template the OpenSSL crypto library.
386 TEMPLATE_VBoxLibCryptoBldProg_EXTENDS := VBoxAdvBldProg
387 TEMPLATE_VBoxLibCryptoBldProg_DEFS = $(TEMPLATE_VBoxAdvBldProg_DEFS) $(TEMPLATE_LibCrypto_DEFS)
388 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win = $(TEMPLATE_VBoxAdvBldProg_CFLAGS.win) $(subst $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.win),, $(TEMPLATE_LibCrypto_CFLAGS.win))
389 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4057 # refcount.h(137): warning C4057: 'function': 'volatile long *' differs in indirection to slightly different base types from 'volatile int *'
390 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4100 # refcount.h(135): warning C4100: 'lock': unreferenced formal parameter
391 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4132 # curve25519.c(5497): warning C4132: 'allzeroes': const object should be initialized
392 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4189 # eng_list.c(373): warning C4189: 'load_dir': local variable is initialized but not referenced
393 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4245 # bn_div.c(353): warning C4245: '=': conversion from '__int64' to 'unsigned __int64', signed/unsigned mismatch
394 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4255 # ctype.c(314): warning C4255: 'ossl_c_locale': no function prototype given: converting '()' to '(void)'
395 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4267 # p12_utl.c(23): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
396 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4389 # encoder_pkey.c(110): warning C4389: '!=': signed/unsigned mismatch
397 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4668 # limits.h(70): warning C4668: '__STDC_WANT_SECURE_LIB__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
398 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.win += -wd4702 # ctrl_params_translate.c(681) : warning C4702: unreachable code
399 TEMPLATE_VBoxLibCryptoBldProg_CFLAGS.freebsd = $(TEMPLATE_VBoxAdvBldProg_CFLAGS.freebsd) $(subst $(TEMPLATE_VBoxR3RuntimeDllNonPedantic_CFLAGS.freebsd),, $(TEMPLATE_LibCrypto_CFLAGS.freebsd))
400 TEMPLATE_VBoxLibCryptoBldProg_INCS = $(TEMPLATE_LibCrypto_INCS) $(TEMPLATE_VBoxAdvBldProg_INCS)
401 TEMPLATE_VBoxLibCryptoBldProg_INTERMEDIATES = $(TEMPLATE_VBoxAdvBldProg_INTERMEDIATES) $(TEMPLATE_LibCrypto_INTERMEDIATES)
402
403 TEMPLATE_VBoxSubLibCryptoBldProg = Build program template a OpenSSL crypto sub-library.
404 TEMPLATE_VBoxSubLibCryptoBldProg_EXTENDS := VBoxLibCryptoBldProg
405 TEMPLATE_VBoxSubLibCryptoBldProg_INSTTYPE = none
406endif # VBOX_WITH_BLD_RTSIGNTOOL_SIGNING
407
408
409#
410# 32-bit version of LibCrypto and SubLibCrypto.
411#
412TEMPLATE_VBoxLibCrypto-x86 = 32-bit template for the OpenSSL crypto library.
413TEMPLATE_VBoxLibCrypto-x86_EXTENDS = LibCrypto
414TEMPLATE_VBoxLibCrypto-x86_BLD_TRG_ARCH = x86
415TEMPLATE_VBoxLibCrypto-x86_DEFS = $(filter-out HC_ARCH_BITS%,$(TEMPLATE_LibCrypto_DEFS)) HC_ARCH_BITS=32 ARCH_BITS=32
416
417TEMPLATE_VBoxSubLibCrypto-x86 = 32-bit template for the OpenSSL crypto sub-library.
418TEMPLATE_VBoxSubLibCrypto-x86_EXTENDS = VBoxLibCrypto-x86
419TEMPLATE_VBoxSubLibCrypto-x86_INSTTYPE = none
420
421ifdef VBOX_WITH_32_ON_64_MAIN_API # 32-bit edition.
422 define VBOX_OPENSSL_X86
423 $(eval LIBRARIES += $(1)-x86)
424 $(1)-x86_TEMPLATE := VBoxSubLibCrypto-x86
425 $(1)-x86_EXTENDS := $(1)
426 endef
427else
428 define VBOX_OPENSSL_X86
429 endef
430endif
431
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette