mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1278456 - Add the tooltool GCC library directory to LD_LIBRARY_PATH on Linux builds. r=mshal
Build slaves on automation are based on Centos 6, which doesn't have a recent enough version of libstdc++ for our new requirements. But since we're building with a recent GCC or clang with its own libstdc++, we do have such a libstdc++ available somewhere, and the compiler picks it when invoking the linker. Problems start happening when we execute some of the built programs during the build, like host tools (e.g. nsinstall), or target programs (xpcshell, during packaging). In that case, we need the compiler's libstdc++ to be used. Which required adding the GCC or clang library directory to LD_LIBRARY_PATH. Unconveniently enough, the clang 3.5 tooltool package we're using for ASAN builds until we can update to at least 3.8 (bug 1278718) doesn't contain libstdc++.so. So for those builds, pull the GCC package from tooltool as well, and pick libstdc++ from there.
This commit is contained in:
parent
aadf5fb0df
commit
c5caa62fdf
@ -12,7 +12,7 @@
|
||||
if test -d $topsrcdir/gcc/bin; then
|
||||
HOST_CC="$topsrcdir/gcc/bin/gcc"
|
||||
HOST_CXX="$topsrcdir/gcc/bin/g++"
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
fi
|
||||
|
||||
# Allow overriding this from the environment, and don't
|
||||
|
@ -16,7 +16,7 @@ MOZ_AUTOMATION_SDK=0
|
||||
if test -d $topsrcdir/../gcc/bin; then
|
||||
HOST_CC="$topsrcdir/../gcc/bin/gcc"
|
||||
HOST_CXX="$topsrcdir/../gcc/bin/g++"
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
fi
|
||||
|
||||
MOZ_HORIZON=1
|
||||
|
@ -16,7 +16,7 @@ MOZ_AUTOMATION_SDK=0
|
||||
if test -d $topsrcdir/../gcc/bin; then
|
||||
HOST_CC="$topsrcdir/../gcc/bin/gcc"
|
||||
HOST_CXX="$topsrcdir/../gcc/bin/g++"
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
fi
|
||||
|
||||
ac_add_options --with-branding=b2g/branding/browserhtml
|
||||
|
@ -17,8 +17,7 @@ ac_add_options --enable-clang-plugin
|
||||
# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
||||
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
|
||||
. $topsrcdir/build/unix/mozconfig.gtk
|
||||
|
@ -9,7 +9,8 @@
|
||||
|
||||
. "$topsrcdir/build/mozconfig.common"
|
||||
ac_add_options --enable-elf-hack
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
||||
# The objdir must be at a known location so its path can be stripped from the
|
||||
# filenames stored by the analysis
|
||||
|
@ -16,8 +16,7 @@ ac_add_options --enable-clang-plugin
|
||||
# Treat warnings as errors (modulo ALLOW_COMPILER_WARNINGS).
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
||||
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
|
||||
. $topsrcdir/build/unix/mozconfig.gtk
|
||||
|
@ -1,5 +1,13 @@
|
||||
[
|
||||
{
|
||||
"version": "gcc 4.8.5 + PR64905",
|
||||
"size": 80160264,
|
||||
"digest": "c1a9dc9da289b8528874d16300b9d13a997cec99195bb0bc46ff665216d8535d6d6cb5af6b4b1f2749af6815dab12e703fdb3849014e5c23a70eff351a0baf4e",
|
||||
"algorithm": "sha512",
|
||||
"filename": "gcc.tar.xz",
|
||||
"unpack": true
|
||||
},
|
||||
{
|
||||
"version": "clang 3.5/r200213",
|
||||
"size": 71282740,
|
||||
"digest": "ee9edb1ef3afd9ab29e39565145545ad57e8d8d2538be4d822d7dbd64038f4529b0b287cecf48bf83def52a26ac2c6faa331686c3ad5e8b4ba4c22686ee0808f",
|
||||
|
@ -24,5 +24,4 @@ ac_add_options --disable-jemalloc
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-elf-hack
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
@ -23,4 +23,6 @@ mk_add_options "export PANGO_SYSCONFDIR=$TOOLTOOL_DIR/gtk3/usr/local/etc"
|
||||
mk_add_options "export PANGO_LIBDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib"
|
||||
mk_add_options "export GDK_PIXBUF_MODULE_FILE=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders.cache"
|
||||
mk_add_options "export GDK_PIXBUF_MODULEDIR=$TOOLTOOL_DIR/gtk3/usr/local/lib/gdk-pixbuf-2.0/2.10.0/loaders"
|
||||
mk_add_options "export LD_LIBRARY_PATH=$TOOLTOOL_DIR/gtk3/usr/local/lib"
|
||||
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/gtk3/usr/local/lib
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
||||
|
@ -28,8 +28,7 @@ fi
|
||||
|
||||
ac_add_options --enable-elf-hack
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
||||
# PKG_CONFIG_LIBDIR is appropriately overridden in mozconfig.linux32
|
||||
export PKG_CONFIG_LIBDIR=/usr/lib64/pkgconfig:/usr/share/pkgconfig
|
||||
|
15
build/unix/mozconfig.stdcxx
Normal file
15
build/unix/mozconfig.stdcxx
Normal file
@ -0,0 +1,15 @@
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
|
||||
TOOLTOOL_DIR=${TOOLTOOL_DIR:-$topsrcdir}
|
||||
|
||||
if [ -f "$TOOLTOOL_DIR/clang/lib/libstdc++.so" ]; then
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/clang/lib
|
||||
elif [ -f "$TOOLTOOL_DIR/gcc/lib/libstdc++.so" ]; then
|
||||
# We put both 32-bits and 64-bits library path in LD_LIBRARY_PATH: ld.so
|
||||
# will prefer the files in the 32-bits path when loading 32-bits executables,
|
||||
# and the files in the 64-bits path when loading 64-bits executables.
|
||||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOOLTOOL_DIR/gcc/lib64:$TOOLTOOL_DIR/gcc/lib
|
||||
fi
|
||||
|
||||
mk_add_options "export LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
|
@ -30,5 +30,4 @@ ac_add_options --disable-install-strip
|
||||
# -gline-tables-only results in significantly smaller binaries.
|
||||
ac_add_options --enable-debug-symbols="-gline-tables-only"
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
@ -77,8 +77,7 @@ export MOZ_PACKAGE_JSSHELL=1
|
||||
HOST_CC="$topsrcdir/gcc/bin/gcc"
|
||||
HOST_CXX="$topsrcdir/gcc/bin/g++"
|
||||
|
||||
# Avoid dependency on libstdc++ 4.7
|
||||
ac_add_options --enable-stdcxx-compat
|
||||
. "$topsrcdir/build/unix/mozconfig.stdcxx"
|
||||
|
||||
# Use libc++ as our C++ standard library
|
||||
ac_add_options --with-android-cxx-stl=libc++
|
||||
|
Loading…
Reference in New Issue
Block a user