[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-build/master] Bug 22328: remove clang PIE wrappers
commit 2e9d63ba9b06b518e21e6f9cbd523d2f8ce11865
Author: Nicolas Vigier <boklm@xxxxxxxxxxxxxx>
Date: Fri Jun 2 13:14:53 2017 +0200
Bug 22328: remove clang PIE wrappers
Those wrappers are no longer necessary to produce PIE binaries.
---
projects/firefox/mozconfig-osx-x86_64 | 12 ++++++------
projects/macosx-toolchain/build | 17 -----------------
projects/macosx-toolchain/config | 4 ++--
projects/openssl/build | 2 +-
4 files changed, 9 insertions(+), 26 deletions(-)
diff --git a/projects/firefox/mozconfig-osx-x86_64 b/projects/firefox/mozconfig-osx-x86_64
index c75b2f5..1658e18 100644
--- a/projects/firefox/mozconfig-osx-x86_64
+++ b/projects/firefox/mozconfig-osx-x86_64
@@ -7,9 +7,9 @@ CROSS_SYSROOT=$TOOLCHAIN_DIR/SDK
CROSS_PRIVATE_FRAMEWORKS=$CROSS_SYSROOT/System/Library/PrivateFrameworks
FLAGS="-target x86_64-apple-darwin10 -mlinker-version=136 -B $CROSS_CCTOOLS_PATH/bin -isysroot $CROSS_SYSROOT"
-export CC="$TOOLCHAIN_DIR/clang/helpers/clang $FLAGS"
-export CXX="$TOOLCHAIN_DIR/clang/helpers/clang++ $FLAGS"
-export CPP="$TOOLCHAIN_DIR/clang/helpers/clang $FLAGS -E"
+export CC="$TOOLCHAIN_DIR/clang/bin/clang $FLAGS"
+export CXX="$TOOLCHAIN_DIR/clang/bin/clang++ $FLAGS"
+export CPP="$TOOLCHAIN_DIR/clang/bin/clang $FLAGS -E"
export LLVMCONFIG=$TOOLCHAIN_DIR/clang/bin/llvm-config
export LDFLAGS="-Wl,-syslibroot,$CROSS_SYSROOT -Wl,-dead_strip -Wl,-pie"
export TOOLCHAIN_PREFIX=$CROSS_CCTOOLS_PATH/bin/x86_64-apple-darwin10-
@@ -20,9 +20,9 @@ export STRIP=${TOOLCHAIN_PREFIX}strip
export OTOOL=${TOOLCHAIN_PREFIX}otool
export DSYMUTIL="$TOOLCHAIN_DIR/clang/bin/llvm-dsymutil"
-export HOST_CC="$TOOLCHAIN_DIR/clang/helpers/clang"
-export HOST_CXX="$TOOLCHAIN_DIR/clang/helpers/clang++"
-export HOST_CPP="$TOOLCHAIN_DIR/clang/helpers/clang -E"
+export HOST_CC="$TOOLCHAIN_DIR/clang/bin/clang"
+export HOST_CXX="$TOOLCHAIN_DIR/clang/bin/clang++"
+export HOST_CPP="$TOOLCHAIN_DIR/clang/bin/clang -E"
export HOST_CFLAGS="-g"
export HOST_CXXFLAGS="-g"
export HOST_LDFLAGS="-g"
diff --git a/projects/macosx-toolchain/build b/projects/macosx-toolchain/build
index b718023..e699e4f 100644
--- a/projects/macosx-toolchain/build
+++ b/projects/macosx-toolchain/build
@@ -11,23 +11,6 @@ cd $distdir/cctools/bin
ln -s ../../clang/bin/clang x86_64-apple-darwin10-clang
ln -s ../../clang/bin/clang++ x86_64-apple-darwin10-clang++
-cd $distdir
-# Bug 20439: build with PIE
-# If we add -fPIE to the FLAGS, the firefox 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++
-mkdir clang/helpers
-cat > clang/helpers/clang << EOF
-#!/bin/sh
-exec $distdir/clang/bin/clang -fPIE "\$@"
-EOF
-cat > clang/helpers/clang++ << EOF
-#!/bin/sh
-exec $distdir/clang/bin/clang++ -fPIE "\$@"
-EOF
-chmod +x clang/helpers/clang clang/helpers/clang++
-
cd "/var/tmp/dist"
[% c('tar', {
tar_src => [ project ],
diff --git a/projects/macosx-toolchain/config b/projects/macosx-toolchain/config
index 55fb554..1779eb8 100644
--- a/projects/macosx-toolchain/config
+++ b/projects/macosx-toolchain/config
@@ -10,9 +10,9 @@ var:
export sysrootdir=/var/tmp/dist/[% project %]/SDK/
export clangdir=/var/tmp/dist/[% project %]/clang
export cctoolsdir=/var/tmp/dist/[% project %]/cctools/bin
- export PATH="$clangdir/helpers:$clangdir/bin:$cctoolsdir:$PATH"
+ export PATH="$clangdir/bin:$cctoolsdir:$PATH"
export LD_LIBRARY_PATH=/var/tmp/dist/[% project %]/clang/lib
- export CC="$clangdir/helpers/clang [% c('var/FLAGS') %]"
+ export CC="$clangdir/bin/clang [% c('var/FLAGS') %]"
export LDFLAGS="[% c('var/LDFLAGS') %]"
input_files:
diff --git a/projects/openssl/build b/projects/openssl/build
index e831b68..3851346 100644
--- a/projects/openssl/build
+++ b/projects/openssl/build
@@ -10,7 +10,7 @@ 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
+ ln -s $clangdir/bin/clang $clangdir/bin/x86_64-apple-darwin10-cc
export CC="cc [% c("var/FLAGS") %]"
[% END -%]
./Configure --prefix=$distdir [% c('var/configure_opts') %]
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits