[build] Move to Jessie sysroots from Wheezy sysroots.

Wheezy is not supported anymore (EOL May 2018) and these sysroots are
really outdated, which introduces build problems whenever we try to
use recent enough features and header files.

We are already using Jessie to build Dart SDK distributions and in some cases we use
Jessie to build binaries for testing (e.g. when building on ARM64).

This CL makes it uniform.

Change-Id: Id4d165a41aa37118f5e49edb2122d905219cd377
Reviewed-on: https://dart-review.googlesource.com/c/81409
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Vyacheslav Egorov 2018-10-25 15:05:22 +00:00 committed by commit-bot@chromium.org
parent 9d81a2f0e6
commit 523353d280
7 changed files with 26 additions and 33 deletions

4
build/.gitignore vendored
View file

@ -4,7 +4,5 @@ win_toolchain.json
# Pulled Debian wheezy sysroots
linux/debian_jessie_arm-sysroot
linux/debian_jessie_arm64-sysroot
linux/debian_wheezy_amd64-sysroot
linux/debian_jessie_amd64-sysroot
linux/debian_wheezy_arm-sysroot
linux/debian_wheezy_i386-sysroot
linux/debian_jessie_i386-sysroot

View file

@ -18,12 +18,12 @@ config("sdk") {
],
"value") ]
# When using the pulled wheezy sysroot with gcc, we have to specify these
# When using the pulled Debian sysroot with gcc, we have to specify these
# excplicitly.
if (dart_use_wheezy_sysroot && !is_clang) {
if (dart_use_debian_sysroot && !is_clang) {
cflags += [
"-I=/usr/include/c++/4.6",
"-I=/usr/include/c++/4.6/i486-linux-gnu",
"-I=/usr/include/c++/4.8",
"-I=/usr/include/c++/4.8/i486-linux-gnu",
]
}
}

View file

@ -10,25 +10,21 @@ declare_args() {
# the target toolchain.
target_sysroot = ""
# Whether the Debian wheezy sysroot should be used.
dart_use_wheezy_sysroot = false
# Whether the Debian sysroot should be used.
dart_use_debian_sysroot = false
}
if (is_linux && dart_use_wheezy_sysroot) {
if (is_linux && dart_use_debian_sysroot) {
if (current_cpu == "x86") {
target_sysroot = rebase_path("//build/linux/debian_wheezy_i386-sysroot", root_build_dir)
target_sysroot = rebase_path("//build/linux/debian_jessie_i386-sysroot", root_build_dir)
} else if (current_cpu == "x64") {
if (is_asan || is_lsan || is_msan || is_tsan) {
target_sysroot = rebase_path("//build/linux/debian_jessie_amd64-sysroot", root_build_dir)
} else {
target_sysroot = rebase_path("//build/linux/debian_wheezy_amd64-sysroot", root_build_dir)
}
target_sysroot = rebase_path("//build/linux/debian_jessie_amd64-sysroot", root_build_dir)
} else if (current_cpu == "arm") {
target_sysroot = rebase_path("//build/linux/debian_wheezy_arm-sysroot", root_build_dir)
target_sysroot = rebase_path("//build/linux/debian_jessie_arm-sysroot", root_build_dir)
} else if (current_cpu == "arm64") {
target_sysroot = rebase_path("//build/linux/debian_jessie_arm64-sysroot", root_build_dir)
} else {
print("There is no Debian wheezy sysroot present for $current_cpu")
print("There is no Debian sysroot present for $current_cpu")
assert(false)
}
}

View file

@ -95,16 +95,15 @@ def main(args):
def InstallDefaultSysrootForArch(target_arch):
if target_arch == 'amd64':
InstallSysroot('Wheezy', 'amd64')
InstallSysroot('Jessie', 'amd64')
elif target_arch == 'arm':
InstallSysroot('Wheezy', 'arm')
InstallSysroot('Jessie', 'arm')
elif target_arch == 'arm64':
InstallSysroot('Jessie', 'arm64')
elif target_arch == 'i386':
InstallSysroot('Wheezy', 'i386')
InstallSysroot('Jessie', 'i386')
elif target_arch == 'mips':
InstallSysroot('Wheezy', 'mips')
InstallSysroot('Jessie', 'mips')
else:
raise Error('Unknown architecture: %s' % target_arch)

View file

@ -248,7 +248,7 @@ def ToGnArgs(args, mode, arch, target_os):
# Setup the user-defined sysroot.
if UseSysroot(args, gn_args):
gn_args['dart_use_wheezy_sysroot'] = True
gn_args['dart_use_debian_sysroot'] = True
else:
sysroot = TargetSysroot(args)
if sysroot:

View file

@ -4,16 +4,16 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Sets the compiler environment variables to use a downloaded wheezy sysroot
# Sets the compiler environment variables to use a downloaded Debian sysroot
# when building Dart with architecture ia32.
# Run this in the same working directory that you have run
# Run this in the same working directory that you have run
# sdk/tools/download_chromium_sysroot.sh in.
# Must be sourced, not run in a subshell, to modify the environment.
# Run with the command ". sdk/tools/set_ia32_sysroot.sh"
# Only tested and used on Ubuntu trusty linux. Used to build dart with
# no requirement for glibc greater than version 2.14.
export CXXFLAGS="--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot -I=/usr/include/c++/4.6 -I=/usr/include/c++/4.6/i486-linux-gnu"
export CXXFLAGS="--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/i486-linux-gnu"
export LDFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot
export CFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_i386-sysroot
export LDFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot
export CFLAGS=--sysroot=$PWD/build/linux/debian_jessie_i386-sysroot

View file

@ -4,16 +4,16 @@
# for details. All rights reserved. Use of this source code is governed by a
# BSD-style license that can be found in the LICENSE file.
# Sets the compiler environment variables to use a downloaded wheezy sysroot
# Sets the compiler environment variables to use a downloaded Debian sysroot
# when building Dart with architecture x64.
# Run this in the same working directory that you have run
# Run this in the same working directory that you have run
# sdk/tools/download_chromium_sysroot.sh in.
# Must be sourced, not run in a subshell, to modify the environment.
# Run with the command ". sdk/tools/set_x64_sysroot.sh"
# Only tested and used on Ubuntu trusty linux. Used to build dart with
# no requirement for glibc greater than version 2.14.
export CXXFLAGS="--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot -I=/usr/include/c++/4.6 -I=/usr/include/c++/4.6/x86_64-linux-gnu"
export CXXFLAGS="--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot -I=/usr/include/c++/4.8 -I=/usr/include/c++/4.8/x86_64-linux-gnu"
export LDFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot
export CFLAGS=--sysroot=$PWD/build/linux/debian_wheezy_amd64-sysroot
export LDFLAGS=--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot
export CFLAGS=--sysroot=$PWD/build/linux/debian_jessie_amd64-sysroot