blob: 32c32d1c217b1981273ba6d96bad36cb98914f0c [file] [log] [blame]
Raymes Khouryb25b3212011-03-22 12:43:56 -07001# Copyright (c) 2011 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4# $Header:
5
6# @ECLASS: binutils-funcs.eclass
7# @MAINTAINER:
8# Raymes Khoury <raymes@google.com>
9# @DESCRIPTION:
10# Functions to get the paths to binutils installations for gold and for GNU ld.
11
12inherit toolchain-funcs
13
14get_binutils_path_ld() {
Zdenek Behancc60eb32012-02-23 00:21:58 +010015 local ld_path=$(readlink -f $(type -p $(tc-getLD ${1})))
16 local binutils_dir=$(dirname ${ld_path})
Raymes Khouryb25b3212011-03-22 12:43:56 -070017 echo ${binutils_dir}
18}
19
20get_binutils_path_gold() {
Zdenek Behancc60eb32012-02-23 00:21:58 +010021 echo $(get_binutils_path_ld ${1})-gold
Raymes Khouryb25b3212011-03-22 12:43:56 -070022}