[tbb-commits] [tor-browser-build/master] Build openssl for OSX using the clang based toolchain

boklm at torproject.org boklm at torproject.org
Thu Apr 6 13:43:01 UTC 2017


commit 385d1149f47e119df747104c16e750d67b8417a4
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Mon Apr 3 16:02:56 2017 +0200

    Build openssl for OSX using the clang based toolchain
    
    Doing changes corresponding to #10369.
---
 projects/openssl/build  | 5 +++++
 projects/openssl/config | 9 +--------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/projects/openssl/build b/projects/openssl/build
index 3a5365e..e831b68 100644
--- a/projects/openssl/build
+++ b/projects/openssl/build
@@ -8,6 +8,11 @@ cd /var/tmp/build/[% project %]-[% c('version') %]
 [% IF c("var/osname") == "linux-i686" -%]
 export CC='gcc -m32'
 [% END %]
+[% IF c("var/osx") -%]
+  # Tricking OpenSSL into using our clang as cross-compiler
+  ln -s $clangdir/helpers/clang $clangdir/helpers/x86_64-apple-darwin10-cc
+  export CC="cc [% c("var/FLAGS") %]"
+[% END -%]
 ./Configure --prefix=$distdir [% c('var/configure_opts') %]
 make
 make install
diff --git a/projects/openssl/config b/projects/openssl/config
index 8490b0b..1a2e4dd 100644
--- a/projects/openssl/config
+++ b/projects/openssl/config
@@ -15,14 +15,7 @@ targets:
       configure_opts: '-shared --cross-compile-prefix=i686-w64-mingw32- mingw "-fstack-protector-all -Wstack-protector --param ssp-buffer-size=4 -fno-strict-overflow -Wno-missing-field-initializers -Wformat -Wformat-security -Wl,--dynamicbase -Wl,--nxcompat -Wl,--enable-reloc-section -lssp -L$gcclibs"'
   osx-x86_64:
     var:
-      configure_opts: --cross-compile-prefix=i686-apple-darwin11- $CFLAGS darwin64-x86_64-cc enable-ec_nistp_64_gcc_128
-      deps:
-        - build-essential
-      arch_deps:
-        - libc6-i386
-        - libstdc++6:i386
-      pre_pkginst: dpkg --add-architecture i386
-      compiler: macosx-toolchain-gcc
+      configure_opts: --cross-compile-prefix=x86_64-apple-darwin10- darwin64-x86_64-cc enable-ec_nistp_64_gcc_128
 
 input_files:
   - project: docker-image





More information about the tbb-commits mailing list