Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deps: make opensslconf.h include each target arch
In OpenSSL, opensslconf.h was generated by Configure script with specifying a target argument, where it includes several defines that depend on OS and architecture platform. In iojs, we statically mapped --dest-os and --dest-cpu options in configure to the target of Configure in OpenSSL and make `deps/openssl/conf/openssconf.h` so as to include each file according to its target by checking pre-defined compiler macros. Included opnesslconf.h files for supported target architectures can be generated by `Makefile` and stored under `archs/{target}/opensslconf.h`. The Makefile alos fixes several defines to meet iojs build requirements. Here is a map table of configure options in iojs, target arch of Configure in OpenSSL and CI support. | --dest-os | --dest-cpu | OpenSSL target arch | CI | | --------- | ---------- | -------------------- | --- | | linux | ia32 | linux-elf | o | | linux | x32 | patched linux-x86_64 | - | | linux | x64 | linux-x86_64 | o | | linux | arm | linux-armv4 | o | | linux | arm64 | N/A | - | | mac | ia32 | darwin-i386-cc | o | | mac | x64 | darwin64-x86-cc | o | | win | ia32 | VC-WIN32 | - | | win | x64 | VC-WIN64A | o | | solaris | ia32 | solaris-x86-gcc | o | | solaris | x64 | solaris64-x86_64-gcc | o | | freebsd | ia32 | BSD-x86 | o | | freebsd | x64 | BSD-x86_64 | o | | openbsd | ia32 | BSD-x86 | - | | openbsd | x64 | BSD-x86_64 | - | | others | others | linux-elf | - | --dest-os and --dest-cpu are mapped to pre-defined macros. | --dest-os | pre-defined macro | | ------------------ | ------------------------- | | win | _WIN32 | | win(64bit) | _WIN64 | | mac | __APPLE__ && __MACH__ | | solaris | __sun | | freebsd | __FreeBSD__ | | openbsd | __OpenBSD__ | | linux (not andorid)| __linux__ && !__ANDROID__ | | android | __ANDROID__ | | --dest-cpu | pre-defined macro | | ---------- | ----------------- | | arm | __arm__ | | arm64 | __aarch64__ | | ia32 | __i386__ | | ia32(win) | _M_IX86 | | mips | __mips__ | | mipsel | __MIPSEL__ | | x32 | __ILP32__ | | x64 | __x86_64__ | | x64(win) | _M_X64 | These are the list which is not implemented yet. | --dest-os | --dest-cpu | OpenSSL target arch | CI | | --------- | ---------- | -------------------- | --- | | linux | mips | linux-mips32,linux-mips64,linux64-mips64? | --- | | linux | mipsel | ? | --- | | android | ia32 | android-x86 | --- | | android | arm | android-armv7 | --- | | android | mips | android-mips | --- | | android | mipsel | ? | --- | Supported target arch list in OpenSSL can be obtained by typing `deps/openssl/openssl/Configure LIST`. This also contains to add two new defines for all platform in the bottom for GOST and Padlock engines are not included in iojs. PR-URL: #1377 Reviewed-By: Fedor Indutny <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
- Loading branch information