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

Issue 668259 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

ec: llvm produces errors when CONFIG_HOSTCMD_ALIGNED is not defined

Project Member Reported by vapier@chromium.org, Nov 23 2016

Issue description

currently boards have to manually select CONFIG_HOSTCMD_ALIGNED.  this shouldn't be needed -- the default should be to turn it on for arches that typically require aligned loads for natural sizes (e.g. arm & aarch64) and to default it to off for the rest.

and then we can strip most boards of it (like reverting https://chromium-review.googlesource.com/413108).
 

Comment 1 by sha...@chromium.org, Nov 23 2016

elm uses an stm32 MCU with a cortex m0 core that requires aligned access (as do most of our cros-ec boards). Assuming it works correctly, CONFIG_HOSTCMD_ALIGNED results in reduced reduced code size and flash / RAM savings. So, we probably do want to leave it enabled.

But I do agree that we shouldn't have to define CONFIG_HOSTCMD_ALIGNED in order to pass compilation.
Found same issue on nyan_big. @shawnn, Can you check all arm/aarch64 boards that need this?
Cc: manojgupta@chromium.org

Comment 4 by sha...@chromium.org, Dec 15 2016

Cc: -vpalatin@chromium.org rspangler@chromium.org
I will look into the issue of llvm throwing errors when CONFIG_HOSTCMD_ALIGNED is not defined. manojgupta@, can you provide information on how to setup your build environment?

Comment 5 by sha...@chromium.org, Dec 15 2016

Cc: -vapier@chromium.org vpalatin@chromium.org
Sorry, didn't mean to remove vpalatin@.

Comment 6 by sha...@chromium.org, Dec 15 2016

Cc: vapier@chromium.org
This seems like an auto-complete bug. Sorry.
Cc: llozano@chromium.org laszio@chromium.org
Cc: -llozano@chromium.org yunlian@chromium.org
Here are the steps to reproduce.

Please run these in ~/trunk/src/scripts

1. emerge llvm with llvm-next option. 
$ USE="llvm-next" sudo emerge llvm clang

Next step has to be repeated per board.

2. Setup llvm profile for build and build ec-utils
$ ./setup_board --board $BOARD --force --profile=llvm && emerge-${BOARD} ec-utils
 

Oak board also has the same issue (and presumably most other arm/aarch64 boards).
Cc: -laszio@chromium.org llozano@chromium.org
Labels: -Pri-3 Build-Toolchain Pri-2
Bumping to P2. 
Cc: laszio@chromium.org
Did not intend to remove laszio@. Adding him back. 
(Hitting probably same auto-complete bug in #6)
Project Member

Comment 12 by bugdroid1@chromium.org, Dec 17 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/ec/+/c6c5a4467467b546c25e1f73a4f4fa2c630b62c6

commit c6c5a4467467b546c25e1f73a4f4fa2c630b62c6
Author: Shawn Nematbakhsh <shawnn@chromium.org>
Date: Thu Dec 15 22:02:27 2016

util/ectool: Fix llvm compiler errors

BUG= chromium:668259 
BRANCH=None
TEST=Manual on samus (w/ gcc-built ectool).
Verify 'ectool pause_in_s5 [on|off]' followed by 'ectool pause_in_s5'
reflects the new updated state.
Verify 'ectool --name=cros_pd flashpd 0 1 ec.RW.bin' succeeds to flash
valid zinger RW image.
Also verify `emerge-nyan_big ec-utils` succeeds w/ new llvm toolchain.

Change-Id: Ibe83ee0fc0b2e6f535ed822603f438ed62350d29
Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/419797
Commit-Ready: Shawn N <shawnn@chromium.org>
Tested-by: Shawn N <shawnn@chromium.org>
Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>

[modify] https://crrev.com/c6c5a4467467b546c25e1f73a4f4fa2c630b62c6/util/ectool.c

Status: Fixed (was: Untriaged)
Summary: ec: llvm produces errors when CONFIG_HOSTCMD_ALIGNED is not defined (was: ec-utils should select sane alignment defaults)

Comment 14 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 15 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

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

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

Sign in to add a comment