summaryrefslogtreecommitdiff
path: root/deps/openssl/openssl.gyp
diff options
context:
space:
mode:
authorShigeki Ohtsu <ohtsu@ohtsu.org>2018-03-07 21:38:23 +0900
committerShigeki Ohtsu <ohtsu@ohtsu.org>2018-04-10 06:45:44 +0900
commit99eb744842462bad1c1c112d7994ffc6f65b06d9 (patch)
tree839773c539df830e204dce3c872841554a8dd023 /deps/openssl/openssl.gyp
parent1bcb6c0d26de749a806523de97b9309da839514d (diff)
downloadandroid-node-v8-99eb744842462bad1c1c112d7994ffc6f65b06d9.tar.gz
android-node-v8-99eb744842462bad1c1c112d7994ffc6f65b06d9.tar.bz2
android-node-v8-99eb744842462bad1c1c112d7994ffc6f65b06d9.zip
deps: add gyp, header and Makefile for openssl110
This commit has a new binding scheme in builing OpenSSL-1.1.0 library with Node. OpenSSL-1.1.0 uses a new build system with perl for various supported platforms. See `Configurations/README` and `Configurations/README.design` in the OpenSSL source for details. In order to build OpenSSL library without perl in the build of Node for various supported platforms, platform dependent files (e.g. asm and header files ) are pre-generated and stored into the `config/arch` directory. - Makefile and generate_gypi.pl Makefile has supported platform list and generates and copies platform dependent files (e.g. asm files) into arch directory with generate_gypi.pl. Platform dependent gypi files also created obtaining build information from `configdata.pm` that is generated with `Configure` in the OpenSSL build system. For Windows, `Configure` generates makefile that is only available to nmake command. Since nmake is not supported in Linux, `Makefile_VC-WIN32` and `Makefile_VC-WIN64A` are made created by hand for the use of GNU make. If make rules or targets are changed in the version up of OpenSSL, they should be also updated. The following files are used in upgrading openssl-1.1.0. - gyp and gypi files openssl.gyp has two targets of openssl and openssl-cli referred from node.gyp. They includes asm and no_asm gypi files with arch dependent gypi according to its build options and platforms . The gyp data which is common with asm and no_asm are stored in openssl_common.gypi. - header files bn_conf.h, dso_conf.h and opensslconf.h are platform dependent in the OpenSSL sources. They are replaced with *.h.tmpl files to include the file in the `../../../config/` and referred to each arch files that depends on asm and no-asm option. Fixes: https://github.com/nodejs/node/issues/4270 PR-URL: https://github.com/nodejs/node/pull/19794 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <rod@vagg.org> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Diffstat (limited to 'deps/openssl/openssl.gyp')
-rw-r--r--deps/openssl/openssl.gyp192
1 files changed, 24 insertions, 168 deletions
diff --git a/deps/openssl/openssl.gyp b/deps/openssl/openssl.gyp
index 170e5fb68b..6b0770ebbc 100644
--- a/deps/openssl/openssl.gyp
+++ b/deps/openssl/openssl.gyp
@@ -1,185 +1,41 @@
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
{
'variables': {
- 'is_clang': 0,
- 'gcc_version': 0,
'openssl_no_asm%': 0,
- 'xcode_version%': 0,
- 'gas_version%': 0,
- 'openssl_fips%': 'false',
},
'targets': [
{
'target_name': 'openssl',
'type': '<(library)',
- 'includes': ['openssl.gypi'],
- 'sources': ['<@(openssl_sources)'],
- 'sources/': [
- ['exclude', 'md2/.*$'],
- ['exclude', 'store/.*$']
+ 'includes': ['./openssl_common.gypi'],
+ 'defines': [
+ # Compile out hardware engines. Most are stubs that dynamically load
+ # the real driver but that poses a security liability when an attacker
+ # is able to create a malicious DLL in one of the default search paths.
+ 'OPENSSL_NO_HW',
],
'conditions': [
- # FIPS
- ['openssl_fips != ""', {
- 'defines': [
- 'OPENSSL_FIPS',
- ],
- 'include_dirs': [
- '<(openssl_fips)/include',
- ],
-
- # Trick fipsld, it expects to see libcrypto.a
- 'product_name': 'crypto',
-
- 'direct_dependent_settings': {
- 'defines': [
- 'OPENSSL_FIPS',
- ],
- 'include_dirs': [
- '<(openssl_fips)/include',
- ],
- },
- }],
- [ 'OS=="aix"', {
- # AIX is missing /usr/include/endian.h
- 'defines': [
- '__LITTLE_ENDIAN=1234',
- '__BIG_ENDIAN=4321',
- '__BYTE_ORDER=__BIG_ENDIAN',
- '__FLOAT_WORD_ORDER=__BIG_ENDIAN'],
- }],
- [ 'node_byteorder=="big"', {
- # Define Big Endian
- 'defines': ['B_ENDIAN']
- }, {
- # Define Little Endian
- 'defines':['L_ENDIAN']
- }],
- ['openssl_no_asm!=0', {
- # Disable asm
- 'defines': [
- 'OPENSSL_NO_ASM',
- ],
- 'sources': ['<@(openssl_sources_no_asm)'],
- }, {
- # "else if" was supported in https://codereview.chromium.org/601353002
- 'conditions': [
- ['target_arch=="arm"', {
- 'defines': ['<@(openssl_defines_asm)'],
- 'sources': ['<@(openssl_sources_arm_void_gas)'],
- }, 'target_arch=="ia32" and OS=="mac"', {
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_ia32_mac)',
- ],
- 'sources': ['<@(openssl_sources_ia32_mac_gas)'],
- }, 'target_arch=="ia32" and OS=="win"', {
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_ia32_win)',
- ],
- 'sources': ['<@(openssl_sources_ia32_win_masm)'],
- }, 'target_arch=="ia32"', {
- # Linux or others
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_ia32_elf)',
- ],
- 'sources': ['<@(openssl_sources_ia32_elf_gas)'],
- }, 'target_arch=="x64" and OS=="mac"', {
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_x64_mac)',
- ],
- 'sources': ['<@(openssl_sources_x64_mac_gas)'],
- }, 'target_arch=="x64" and OS=="win"', {
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_x64_win)',
- ],
- 'sources': ['<@(openssl_sources_x64_win_masm)'],
- }, 'target_arch=="x64"', {
- # Linux or others
- 'defines': [
- '<@(openssl_defines_asm)',
- '<@(openssl_defines_x64_elf)',
- ],
- 'sources': ['<@(openssl_sources_x64_elf_gas)'],
- }, 'target_arch=="arm64"', {
- 'defines': ['<@(openssl_defines_arm64)',],
- 'sources': ['<@(openssl_sources_arm64_linux64_gas)'],
- }, {
- # Other architectures don't use assembly.
- 'defines': ['OPENSSL_NO_ASM'],
- 'sources': ['<@(openssl_sources_no_asm)'],
- }],
- ],
- }], # end of conditions of openssl_no_asm
- ['OS=="win"', {
- 'defines' : ['<@(openssl_defines_all_win)'],
+ [ 'openssl_no_asm==0', {
+ 'includes': ['./openssl_asm.gypi'],
}, {
- 'defines' : ['<@(openssl_defines_all_non_win)']
- }],
- ['target_arch=="ia32" and OS=="win"', {
- 'msvs_settings': {
- 'MASM': {
- # Use /safeseh, see commit: 01fa5ee
- 'UseSafeExceptionHandlers': 'true',
- },
- },
+ 'includes': ['./openssl_no_asm.gypi'],
}],
],
- 'include_dirs': ['<@(openssl_include_dirs)'],
'direct_dependent_settings': {
- 'include_dirs': [
- 'openssl/include'
- ],
- },
- },
- {
+ 'include_dirs': [ 'openssl/include']
+ }
+ }, {
# openssl-cli target
- 'includes': ['openssl-cli.gypi',],
- }
+ 'target_name': 'openssl-cli',
+ 'type': 'executable',
+ 'dependencies': ['openssl'],
+ 'includes': ['./openssl_common.gypi'],
+ 'conditions': [
+ ['openssl_no_asm==0', {
+ 'includes': ['./openssl-cl_asm.gypi'],
+ }, {
+ 'includes': ['./openssl-cl_no_asm.gypi'],
+ }],
+ ],
+ },
],
- 'target_defaults': {
- 'includes': ['openssl.gypi'],
- 'include_dirs': ['<@(openssl_default_include_dirs)'],
- 'defines': ['<@(openssl_default_defines_all)'],
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['<@(openssl_default_defines_win)'],
- 'link_settings': {
- 'libraries': ['<@(openssl_default_libraries_win)'],
- },
- }, {
- 'defines': ['<@(openssl_default_defines_not_win)'],
- 'cflags': ['-Wno-missing-field-initializers'],
- 'xcode_settings': {
- 'WARNING_CFLAGS': ['-Wno-missing-field-initializers'],
- },
- 'conditions': [
- ['OS=="mac"', {
- 'defines': ['<@(openssl_default_defines_mac)'],
- }, {
- 'defines': ['<@(openssl_default_defines_linux_others)'],
- }],
- ]
- }],
- ['is_clang==1 or gcc_version>=43', {
- 'cflags': ['-Wno-old-style-declaration'],
- }],
- ['OS=="solaris"', {
- 'defines': ['__EXTENSIONS__'],
- }],
- ],
- },
}
-
-# Local Variables:
-# tab-width:2
-# indent-tabs-mode:nil
-# End:
-# vim: set expandtab tabstop=2 shiftwidth=2: