gcc_next fails chromeos-ec unittest |
|||||
Issue descriptionwhen build chromeos-ec with next_gcc, I got chromeos-ec-0.0.1-r4024: CC RO/chip/stm32/spi.o chromeos-ec-0.0.1-r4024: CC RW/common/system.o chromeos-ec-0.0.1-r4024: CC RO/board/llama/board.o chromeos-ec-0.0.1-r4024: /usr/x86_64-pc-linux-gnu/arm-none-eabi/binutils-bin/2.27/ld.bfd.real: No room left in the flash chromeos-ec-0.0.1-r4024: collect2: error: ld returned 1 exit status chromeos-ec-0.0.1-r4024: make[2]: *** [Makefile.rules:345: build/gru/RO/ec.RO.elf] Error 1 chromeos-ec-0.0.1-r4024: make[2]: *** Waiting for unfinished jobs....
,
Jul 24 2017
This error was introduced by this commit https://chromium-review.googlesource.com/c/557305/ To reproduce it, inside chroot, run sudo USE="next_gcc" cross-arm-none-eabi/gcc FEATURES="test" emerge-terra chromeos-ec
,
Jul 24 2017
,
Jul 24 2017
We'll look into it. That's 'sudo USE="next_gcc" emerge cross-arm-none-eabi/gcc', right? Is it best to do this from a clean chroot? I ran into some library dependency issues (libs built with old toolchain, I think).
,
Jul 25 2017
Checking closer, the new toolchain is producing a slightly larger image for gru (RO size 0x1a004 vs 0x19f84), which now exceeds the region of SRAM apportioned for the image. Looking at the disassembly, gpio_set_flags_by_mask() looks significantly larger, maybe due to some missed optimizations in gpio_interrupt_type_sel() (inlined). I'll make some small changes to gpio_interrupt_type_sel() that should produce smaller code.
,
Jul 25 2017
Yes, it is best to do this in a clean chroot. Please let me know it you get any issue in doing this.
,
Jul 25 2017
https://chromium-review.googlesource.com/#/c/584820/ will claw-back half of the lost code space and fix the build (original delta was 0x80 bytes, now we're at 0x40 bytes). npcx __enter_hibernate() seems to be the single biggest remaining hog, using 0x20 more bytes. I'm not going to investigate that right now.
,
Jul 28 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/ec/+/e302a0d87fb47f9ec93ccfa771f13f55abd73758 commit e302a0d87fb47f9ec93ccfa771f13f55abd73758 Author: Shawn Nematbakhsh <shawnn@chromium.org> Date: Fri Jul 28 02:56:24 2017 npcx: gpio: Optimize gpio_interrupt_type_sel() for code space reduction gpio_interrupt_type_sel() is guaranteed to be called with at least one GPIO_INT_ANY bit set, but our new toolchain doesn't seem to realize it. BUG= chromium:747553 BRANCH=None TEST=`make BOARD=gru -j` with next_gcc, also verify kevin boots to OS. Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Change-Id: Ice2a9963983dca2ee9c0c543bf55c27753c42933 Reviewed-on: https://chromium-review.googlesource.com/584820 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> [modify] https://crrev.com/e302a0d87fb47f9ec93ccfa771f13f55abd73758/chip/npcx/gpio.c
,
Jul 28 2017
,
Aug 1 2017
thanks!
,
Aug 1 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by llozano@chromium.org
, Jul 24 2017Owner: yunlian@chromium.org
Status: Assigned (was: Untriaged)