Ticket #20439: tor-browser-bundle-0001-Bug-20439-make-the-build-PIE-on-OSX.patch

File tor-browser-bundle-0001-Bug-20439-make-the-build-PIE-on-OSX.patch, 1.4 KB (added by boklm, 3 years ago)
  • gitian/descriptors/mac/gitian-firefox.yml

    From 1adbac6e9e6210c0b45fc1e45a7f32b171545b7e Mon Sep 17 00:00:00 2001
    From: Nicolas Vigier <boklm@torproject.org>
    Date: Tue, 8 Nov 2016 17:32:00 +0100
    Subject: [PATCH] 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 7461031e0f5e..aae6139a8196 100644
    a b script: | 
    4040  tar xaf ../MacOSX10.7.sdk.tar.gz
    4141  tar xaf ../cctools.tar.gz
    4242  unzip ../clang-linux64-wheezy-utils.zip
     43  # Bug 20439: build with PIE
     44  # If we add -fPIE to the FLAGS, the build fails in js/src/ctypes/libffi
     45  # with libtool giving an error:
     46  #   libtool: compile: unable to infer tagged configuration
     47  # To avoid this error, we add -fPIE using wrappers on clang and clang++
     48  mv clang/bin/clang clang/bin/clang.real
     49  mv clang/bin/clang++ clang/bin/clang++.real
     50  cat > clang/bin/clang << EOF
     51  #!/bin/sh
     52  exec $(pwd)/clang/bin/clang.real -fPIE "\$@"
     53  EOF
     54  cat > clang/bin/clang++ << EOF
     55  #!/bin/sh
     56  exec $(pwd)/clang/bin/clang++.real -fPIE "\$@"
     57  EOF
     58  chmod +x clang/bin/clang clang/bin/clang++
     59  #
    4360  TB_COMMIT_DATE=$(git show -s --format='%ci')
    4461  COPYRIGHT_YEAR=${TB_COMMIT_DATE%%-*}
    4562  mv .mozconfig-mac .mozconfig