diff options
author | Yidi Lin <yidilin@chromium.org> | 2024-05-04 17:25:33 +0800 |
---|---|---|
committer | Yu-Ping Wu <yupingso@google.com> | 2024-05-09 08:34:05 +0000 |
commit | 3d807d262fbc20dad5262934712dcf27215ba5b8 (patch) | |
tree | 41e3779a963641dab6f6d4650e52a1a2d0fbb8cc /src/arch/arm64 | |
parent | 904c09bb9cd5cc1623a0c84bc6a121b615029c54 (diff) |
arch/arm64/Makefile.mk: Switch linker to GNU GCC
TF-A migrates the default choice of linker to GCC in order to enable
LTO. Change BL31_LDFLAGS from `--emit-relocs` to '-Wl,--emit-relocs', so
that GCC is able to pass `--emit-relocs` to the linker.
[1]: https://review.trustedfirmware.org/c/26703
BUG=b:338420310
TEST=emerge-geralt coreboot
TEST=./util/abuild/abuild -t google/geralt -b geralt -a
TEST=./util/abuild/abuild -t google/oak -b elm -a
Change-Id: I65b96aaa052138592a0f57230e1140a1bb2f07ac
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82189
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch/arm64')
-rw-r--r-- | src/arch/arm64/Makefile.mk | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/arch/arm64/Makefile.mk b/src/arch/arm64/Makefile.mk index 8ab41b627a..897dae525f 100644 --- a/src/arch/arm64/Makefile.mk +++ b/src/arch/arm64/Makefile.mk @@ -173,14 +173,13 @@ BL31_MAKEARGS += IS_ANYTHING_TO_BUILD=1 BL31_MAKEARGS += BUILD_MESSAGE_TIMESTAMP='"$(shell sed -n 's/^.define COREBOOT_BUILD\>.*"\(.*\)".*/\1/p' $(obj)/build.h)"' BL31_CFLAGS := -fno-pic -fno-stack-protector -Wno-deprecated-declarations -Wno-unused-function -BL31_LDFLAGS := --emit-relocs +BL31_LDFLAGS := -Wl,--emit-relocs BL31 := $(obj)/bl31.elf $(BL31): $(obj)/build.h printf " MAKE $(subst $(obj)/,,$(@))\n" - +unset AS AR CC CPP OC OD; \ - LD=$(word 1, $(LD_arm64)) \ + +unset AS AR CC CPP OC OD LD; \ CROSS_COMPILE="$(CROSS_COMPILE_arm64)" \ CFLAGS="$(BL31_CFLAGS)" \ LDFLAGS="$(BL31_LDFLAGS)" \ |