diff options
author | Luis Lozano <llozano@chromium.org> | 2013-03-20 12:32:56 -0700 |
---|---|---|
committer | ChromeBot <chrome-bot@google.com> | 2013-03-20 15:23:30 -0700 |
commit | 4cea9de295fcb982a6d92fc424f3b37781d4d1c5 (patch) | |
tree | 23db736343ac397a26b1c346bf2eb1012be7ae5f /build_tc.py | |
parent | c7f1593f9af3ea1b9264b37628c36f3a70e1749a (diff) | |
download | toolchain-utils-4cea9de295fcb982a6d92fc424f3b37781d4d1c5.tar.gz |
Copy gcc libs directory to sysroot after build.
Tools like crosperf look for the gcc libraries under the sysroot.
Also fixed a mino issue when using --gcc_dir and other *_dir options
when the directory given does not exist.
BUG=None
TEST=Build toolchain and verified the libraries are copied to the
correct place.
Verified that the *_dir options check for existance of dir given
Change-Id: I61599db2843d5bdbbc479164a8f05c722f9f7e75
Reviewed-on: https://gerrit-int.chromium.org/34153
Reviewed-by: Yunlian Jiang <yunlian@google.com>
Reviewed-by: Caroline Tice <cmtice@google.com>
Commit-Queue: Luis Lozano <llozano@chromium.org>
Tested-by: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'build_tc.py')
-rwxr-xr-x | build_tc.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/build_tc.py b/build_tc.py index 0c009b3a..02918b68 100755 --- a/build_tc.py +++ b/build_tc.py @@ -151,7 +151,14 @@ class ToolchainPart(object): env_string = " ".join(["%s=\"%s\"" % var for var in env.items()]) command = "emerge =cross-%s/%s-9999" % (self._ctarget, self._name) full_command = "sudo %s %s" % (env_string, command) - return self._ce.ChrootRunCommand(self._chromeos_root, full_command) + rv = self._ce.ChrootRunCommand(self._chromeos_root, full_command) + if rv != 0: + return rv + if self._name == "gcc": + command = ("sudo cp -r /usr/lib/gcc/%s /build/%s/usr/lib/gcc/." % + (self._ctarget, self._board)) + rv = self._ce.ChrootRunCommand(self._chromeos_root, command) + return rv def MoveMaskFile(self): self._new_mask_file = None @@ -253,10 +260,13 @@ def Main(argv): chromeos_root = misc.CanonicalizePath(options.chromeos_root) if options.gcc_dir: gcc_dir = misc.CanonicalizePath(options.gcc_dir) + assert gcc_dir and os.path.isdir(gcc_dir), "gcc_dir does not exist!" if options.binutils_dir: binutils_dir = misc.CanonicalizePath(options.binutils_dir) + assert os.path.isdir(binutils_dir), "binutils_dir does not exist!" if options.gdb_dir: gdb_dir = misc.CanonicalizePath(options.gdb_dir) + assert os.path.isdir(gdb_dir), "gdb_dir does not exist!" if options.unmount_only: options.mount_only = False elif options.mount_only: |