Force gnu bfd linker for coreboot.
Gold Linker does not support properly customized ld script. BRANCH=none?? Is this correct? I am not sure of this. BUG=chromium:461220 TEST=build coreboot under rush_ryu Signed-off-by: Han Shen <shenhan@google.com> Change-Id: Ic2f5a8000d764ff7374aa1aaa00895dafb75f307 Reviewed-on: https://chromium-review.googlesource.com/252870 Reviewed-by: Julius Werner <jwerner@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Commit-Queue: Han Shen <shenhan@chromium.org> Tested-by: Han Shen <shenhan@chromium.org> (cherry picked from commit 319365c7b11a5e48d8ecc5141b4b954c5533c85d) Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/255972
This commit is contained in:
parent
9192c1a32e
commit
dfd55f1fbd
1 changed files with 5 additions and 4 deletions
|
|
@ -94,6 +94,10 @@ detect_special_flags() {
|
|||
testcc "$CC" "$CFLAGS -Wno-unused-but-set-variable " &&
|
||||
CFLAGS="$CFLAGS -Wno-unused-but-set-variable "
|
||||
|
||||
# Use bfd linker instead of gold if available:
|
||||
testcc "$CC" "$CFLAGS -fuse-ld=bfd" &&
|
||||
CFLAGS="$CFLAGS -fuse-ld=bfd" && LINKER_SUFFIX='.bfd'
|
||||
|
||||
testcc "$CC" "$CFLAGS -Wa,--divide" &&
|
||||
CFLAGS="$CFLAGS -Wa,--divide"
|
||||
testcc "$CC" "$CFLAGS -fno-stack-protector"&&
|
||||
|
|
@ -103,9 +107,6 @@ detect_special_flags() {
|
|||
|
||||
case "$architecture" in
|
||||
x86 )
|
||||
# Use bfd linker instead of gold if available:
|
||||
testcc "$CC" "$CFLAGS -fuse-ld=bfd" &&
|
||||
CFLAGS="$CFLAGS -fuse-ld=bfd" && LINKER_SUFFIX_i386='.bfd'
|
||||
# Always build for i686 -- no sse/mmx instructions since SMM
|
||||
# modules are compiled using these flags. Note that this
|
||||
# doesn't prevent a project using xcompile to explicitly
|
||||
|
|
@ -127,7 +128,7 @@ report_arch_toolchain() {
|
|||
# elf${TWIDTH}-${TBFDARCH} toolchain (${GCCPREFIX}gcc)
|
||||
CC_${TARCH}:=${GCCPREFIX}gcc ${CFLAGS}
|
||||
AS_${TARCH}:=${GCCPREFIX}as ${ASFLAGS}
|
||||
LD_${TARCH}:=${GCCPREFIX}ld$(eval echo \${LINKER_SUFFIX_${TARCH}}) ${LDFLAGS}
|
||||
LD_${TARCH}:=${GCCPREFIX}ld${LINKER_SUFFIX} ${LDFLAGS}
|
||||
NM_${TARCH}:=${GCCPREFIX}nm
|
||||
OBJCOPY_${TARCH}:=${GCCPREFIX}objcopy
|
||||
OBJDUMP_${TARCH}:=${GCCPREFIX}objdump
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue