New issue
Advanced search Search tips

Issue 635147 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 632387
Owner: ----
Closed: Aug 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

chromeos-mrc failed with profile=llvm on chell

Project Member Reported by laszio@chromium.org, Aug 5 2016

Issue description

make -C GnuGenBootSector
make[1]: Entering directory '/build/chell/tmp/portage/sys-boot/chromeos-mrc-0.0.1-r209/work/chromeos-mrc-0.0.1/edk2/BaseTools/Source/C/GnuGenBootSector'
mkdir ../bin
x86_64-cros-linux-gnu-gcc  -c -MD -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-deprecated-declarations -nostdlib -c -g  -I .. -I ../Include/Common -I ../Include/ -I ../Include/IndustryStandard -I ../Common/ -I .. -I . -I ../Include/X64/  GnuGenBootSector.c -o GnuGenBootSector.o
x86_64-cros-linux-gnu-gcc -o ../bin/GnuGenBootSector  GnuGenBootSector.o -L../libs -lCommon
/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51/ld.gold.real: error: GnuGenBootSector.o: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51/ld.gold.real: error: ../libs/libCommon.a(CommonLib.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51/ld.gold.real: error: ../libs/libCommon.a(EfiUtilityMsgs.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/x86_64-pc-linux-gnu/x86_64-cros-linux-gnu/binutils-bin/2.25.51/ld.gold.real: error: ../libs/libCommon.a(ParseInf.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
collect2: error: ld returned 1 exit status
../Makefiles/app.makefile:24: recipe for target '../bin/GnuGenBootSector' failed
make[1]: *** [../bin/GnuGenBootSector] Error 1
 
Summary: chromeos-mrc with profile=llvm on chell (was: Clang failed to build chromeos-mrc for chell)
Summary: chromeos-mrc failed with profile=llvm on chell (was: chromeos-mrc with profile=llvm on chell)
OK, GnuGenBootSector should be a host tool which is supposed to be compiled by host cc. However, this CL calls cros_use_gcc (because clang doesn't work) which sets CC to target cc:

https://crrev.com/5c089b936d2e10aa8ea836bb01b046ba81cb38a7

Need to find a way out.
Cc: vapier@chromium.org
Hi Mike, it seems that cros_use_gcc confuses some scripts that builds host tools. What do you think if I replace cros_use_gcc with "unset CC"?
Mergedinto: 632387
Status: Duplicate (was: Untriaged)

Sign in to add a comment