New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 699628 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Last visit > 30 days ago
Closed: Mar 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Default linker in standalone toolchain for aarch64-cros-linux-gnu should be ld.bfd

Project Member Reported by rahulchaudhry@chromium.org, Mar 8 2017

Issue description

In the development chroot, ld.bfd is configured as the default linker for aarch64. This is specified in at least two places:
1) binutils ebuild: https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/master/sys-devel/binutils/binutils-9999.ebuild#379
(config_gold is false for aarch64).
2) cros_setup_toolchains: https://chromium.googlesource.com/chromiumos/chromite/+/master/scripts/cros_setup_toolchains.py#65
(aarch64-cros-linux-gnu is not listed to have -gold suffix).


However, in the standalone toolchain, ld.gold gets configured as default. I verified this by running
$ sudo cros_setup_toolchains -t aarch64-cros-linux-gnu --create-packages
and then untarring the package and peeking inside:
$ cat bin/aarch64-cros-linux-gnu-ld
#!/bin/sh
base=$(realpath "$0")
basedir=${base%/*}
exec "${basedir}/../usr/x86_64-pc-linux-gnu/aarch64-cros-linux-gnu/binutils-bin/2.25.51-gold/ld" "$@"


It looks like _ProcessBinutilsConfig in cros_setup_toolchain (https://chromium.googlesource.com/chromiumos/chromite/+/master/scripts/cros_setup_toolchains.py#973) picks the "*-gold" configs unconditionally. It should respect CONFIG_TARGET_SUFFIXES for binutils.
 
Status: Started (was: Untriaged)
CL pending: https://chromium-review.googlesource.com/#/c/451718/
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 10 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/4891b4d6c3d0abbc3b304cf154855de4cb508ccc

commit 4891b4d6c3d0abbc3b304cf154855de4cb508ccc
Author: Rahul Chaudhry <rahulchaudhry@chromium.org>
Date: Fri Mar 10 02:10:12 2017

cros_setup_toolchains: respect CONFIG_TARGET_SUFFIXES for standalone toolchains

If gold is not the default linker in the chroot for a target, it should
not be the default linker in the standalone toolchain either.

BUG= chromium:699628 
TEST='cros_setup_toolchains -t aarch64-cros-linux-gnu --create-packages'
and verified that the default linker in the toolchain tarball is bfd.
TEST='cros_setup_toolchains -t armv7a-cros-linux-gnueabi --create-packages'
and verified that the default linker in the toolchain tarball is gold.

Change-Id: I7e0a3c70b69b9c963352346238a2660964396e36
Reviewed-on: https://chromium-review.googlesource.com/451718
Commit-Ready: Rahul Chaudhry <rahulchaudhry@chromium.org>
Tested-by: Rahul Chaudhry <rahulchaudhry@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/4891b4d6c3d0abbc3b304cf154855de4cb508ccc/scripts/cros_setup_toolchains.py

Status: Fixed (was: Started)

Comment 4 by dchan@google.com, May 30 2017

Labels: VerifyIn-60

Comment 5 by dchan@chromium.org, Aug 1 2017

Labels: VerifyIn-61
Status: Verified (was: Fixed)
Closing. Please reopen it if its not fixed. Thanks!

Sign in to add a comment