Unverified Commit 2e9d63ba authored by boklm's avatar boklm
Browse files

Bug 22328: remove clang PIE wrappers

Those wrappers are no longer necessary to produce PIE binaries.
parent 7125ca7b
......@@ -7,9 +7,9 @@ CROSS_SYSROOT=$TOOLCHAIN_DIR/SDK
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 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"
......@@ -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
exec $distdir/clang/bin/clang -fPIE "\$@"
cat > clang/helpers/clang++ << EOF
exec $distdir/clang/bin/clang++ -fPIE "\$@"
chmod +x clang/helpers/clang clang/helpers/clang++
cd "/var/tmp/dist"
[% c('tar', {
tar_src => [ project ],
......@@ -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') %]"
......@@ -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') %]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment