New issue
Advanced search Search tips

Issue 862708 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner: ----
Closed: Jul 12
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

MIPS build fails on linking, gnu hash isn't supported by MIPS ABI

Reported by djordje....@mips.com, Jul 11

Issue description

UserAgent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0

Steps to reproduce the problem:
1. get depot_tools; fetch chromium
2. gn gen out/Release --args=" target_os=\"linux\" target_cpu=\"mipsel\""
3. ninja -C out/Release

What is the expected behavior?

What went wrong?
Build fails with linker error, complaining that gnu hash isn't supported by mips abi.

Did this work before? N/A 

Chrome version: <Copy from: 'about:version'>  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 30.0 r0

By default, gold (and bfd ld) assume option --hash-style=both, making them emit both gnu hash and sysv hash. MIPS ABI supports only gnu hash.

This behavior was added to binutils with following commit:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2760f24c4942853eac7b921e4b8843d57a602654

Which was in turn added to chromiums bundled binaries with this commit:
https://chromium.googlesource.com/chromium/src/+/ee84db22e78330dde850130dcd52b26ee55e5a7d
which has also introduced the issue for chromium mips build.
 
Proposed fix: crrev.com/c/1133979
Project Member

Comment 2 by bugdroid1@chromium.org, Jul 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68f5bba43ac5253bc96447696b74b6e23fc68d95

commit 68f5bba43ac5253bc96447696b74b6e23fc68d95
Author: Djordje Golubovic <djordje.golubovic@mips.com>
Date: Wed Jul 11 21:38:08 2018

Force using --hash-style=sysv for MIPS

By default, linker assumes --hash-style=both, but GNU hash is not
supported by MIPS ABI.

Bug:  862708 
Change-Id: Id49ab510d62d4f969e48ba5fa2dcd91ab5584db6
Reviewed-on: https://chromium-review.googlesource.com/1133979
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#574345}
[modify] https://crrev.com/68f5bba43ac5253bc96447696b74b6e23fc68d95/build/config/compiler/BUILD.gn

Status: Fixed (was: Unconfirmed)

Sign in to add a comment