Raymes Khoury | 3da99e0 | 2011-03-22 12:43:56 -0700 | [diff] [blame] | 1 | # 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 | |
| 12 | inherit toolchain-funcs |
| 13 | |
| 14 | get_binutils_path_ld() { |
| 15 | ld_path=$(readlink -f $(which $(tc-getLD))) |
| 16 | binutils_dir=$(dirname ${ld_path}) |
| 17 | echo ${binutils_dir} |
| 18 | } |
| 19 | |
| 20 | get_binutils_path_gold() { |
| 21 | echo $(get_binutils_path_ld)-gold |
| 22 | } |