Special case build recipe for universal build of openssl. The upstream OpenSSL build system does not directly support OS X universal builds. We need to build each architecture separately then lipo them together into fat libraries.
(basedir, archList)
| 817 | fatal('%s checksum mismatch for file %s' % (algo, fname)) |
| 818 | |
| 819 | def build_universal_openssl(basedir, archList): |
| 820 | """ |
| 821 | Special case build recipe for universal build of openssl. |
| 822 | |
| 823 | The upstream OpenSSL build system does not directly support |
| 824 | OS X universal builds. We need to build each architecture |
| 825 | separately then lipo them together into fat libraries. |
| 826 | """ |
| 827 | |
| 828 | # OpenSSL fails to build with Xcode 2.5 (on OS X 10.4). |
| 829 | # If we are building on a 10.4.x or earlier system, |
| 830 | # unilaterally disable assembly code building to avoid the problem. |
| 831 | no_asm = int(platform.release().split(".")[0]) < 9 |
| 832 | |
| 833 | def build_openssl_arch(archbase, arch): |
| 834 | "Build one architecture of openssl" |
| 835 | arch_opts = { |
| 836 | "i386": ["darwin-i386-cc"], |
| 837 | "x86_64": ["darwin64-x86_64-cc", "enable-ec_nistp_64_gcc_128"], |
| 838 | "arm64": ["darwin64-arm64-cc"], |
| 839 | "ppc": ["darwin-ppc-cc"], |
| 840 | "ppc64": ["darwin64-ppc-cc"], |
| 841 | } |
| 842 | |
| 843 | # Somewhere between OpenSSL 1.1.0j and 1.1.1c, changes cause the |
| 844 | # "enable-ec_nistp_64_gcc_128" option to get compile errors when |
| 845 | # building on our 10.6 gcc-4.2 environment. There have been other |
| 846 | # reports of projects running into this when using older compilers. |
| 847 | # So, for now, do not try to use "enable-ec_nistp_64_gcc_128" when |
| 848 | # building for 10.6. |
| 849 | if getDeptargetTuple() == (10, 6): |
| 850 | arch_opts['x86_64'].remove('enable-ec_nistp_64_gcc_128') |
| 851 | |
| 852 | configure_opts = [ |
| 853 | "no-idea", |
| 854 | "no-mdc2", |
| 855 | "no-rc5", |
| 856 | "no-zlib", |
| 857 | "no-ssl3", |
| 858 | # "enable-unit-test", |
| 859 | "shared", |
| 860 | "--prefix=%s"%os.path.join("/", *FW_VERSION_PREFIX), |
| 861 | "--openssldir=%s"%os.path.join("/", *FW_SSL_DIRECTORY), |
| 862 | ] |
| 863 | if no_asm: |
| 864 | configure_opts.append("no-asm") |
| 865 | runCommand(" ".join(["perl", "Configure"] |
| 866 | + arch_opts[arch] + configure_opts)) |
| 867 | runCommand("make depend") |
| 868 | runCommand("make all") |
| 869 | runCommand("make install_sw DESTDIR=%s"%shellQuote(archbase)) |
| 870 | # runCommand("make test") |
| 871 | return |
| 872 | |
| 873 | srcdir = os.getcwd() |
| 874 | universalbase = os.path.join(srcdir, "..", |
| 875 | os.path.basename(srcdir) + "-universal") |
| 876 | os.mkdir(universalbase) |
nothing calls this directly
no test coverage detected
searching dependent graphs…