[tbb-commits] [tor-browser-bundle/master] Bug 20439: make the build PIE on OSX

gk at torproject.org gk at torproject.org
Wed Nov 9 12:33:48 UTC 2016


commit 565f2cc6e5c8e496bc50f03defa98947e24c93c4
Author: Nicolas Vigier <boklm at torproject.org>
Date:   Tue Nov 8 17:32:00 2016 +0100

    Bug 20439: make the build PIE on OSX
---
 gitian/descriptors/mac/gitian-firefox.yml | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/gitian/descriptors/mac/gitian-firefox.yml b/gitian/descriptors/mac/gitian-firefox.yml
index 7461031..aae6139 100644
--- a/gitian/descriptors/mac/gitian-firefox.yml
+++ b/gitian/descriptors/mac/gitian-firefox.yml
@@ -40,6 +40,23 @@ script: |
   tar xaf ../MacOSX10.7.sdk.tar.gz
   tar xaf ../cctools.tar.gz
   unzip ../clang-linux64-wheezy-utils.zip
+  # Bug 20439: build with PIE
+  # If we add -fPIE to the FLAGS, the build fails in js/src/ctypes/libffi
+  # with libtool giving an error:
+  #   libtool: compile: unable to infer tagged configuration
+  # To avoid this error, we add -fPIE using wrappers on clang and clang++
+  mv clang/bin/clang clang/bin/clang.real
+  mv clang/bin/clang++ clang/bin/clang++.real
+  cat > clang/bin/clang << EOF
+  #!/bin/sh
+  exec $(pwd)/clang/bin/clang.real -fPIE "\$@"
+  EOF
+  cat > clang/bin/clang++ << EOF
+  #!/bin/sh
+  exec $(pwd)/clang/bin/clang++.real -fPIE "\$@"
+  EOF
+  chmod +x clang/bin/clang clang/bin/clang++
+  #
   TB_COMMIT_DATE=$(git show -s --format='%ci')
   COPYRIGHT_YEAR=${TB_COMMIT_DATE%%-*}
   mv .mozconfig-mac .mozconfig



More information about the tbb-commits mailing list