fix toolchain location when using variants

BUG=None
TEST=run setup_board with a variant, run build_packages --fast

Review URL: http://codereview.chromium.org/3046009
This commit is contained in:
Antoine Labour 2010-07-21 15:28:31 -07:00
parent a1feb99412
commit 2a58d0e610

View File

@ -277,7 +277,10 @@ class DepGraphGenerator(object):
os.environ["SYSROOT"] = "/build/" + self.board
scripts_dir = os.path.dirname(os.path.realpath(__file__))
toolchain_path = "%s/../overlays/overlay-%s/toolchain.conf"
f = open(toolchain_path % (scripts_dir, self.board))
# Strip the variant out of the board name to look for the toolchain. This
# is similar to what setup_board does.
board_no_variant = self.board.split('_')[0]
f = open(toolchain_path % (scripts_dir, board_no_variant))
os.environ["CHOST"] = f.readline().strip()
f.close()