Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Patrick Georgi: Looks good to me, approved Paul Menzel: Looks good to me, but someone else must approve
xcompile: Use GCC wrappers for ar, nm

When compiling with GCC, use the special wrappers around ar and nm that
provide the path to the plugin they need to understand LTO object files.
These wrappers forward all other functionality to the underlying
programs, so they should otherwise be equivalent.

Change-Id: Ibdae4faabf67bf6a4bb8c38970f6189646ee74b3
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38290
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
---
M util/xcompile/xcompile
1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile
index a116407..3203d71 100755
--- a/util/xcompile/xcompile
+++ b/util/xcompile/xcompile
@@ -293,12 +293,17 @@
fi # if [ "${TARCH}" = "arm64" ]...

cat <<EOF
-NM_${TARCH}:=${GCCPREFIX}nm
+ifeq (\$(CONFIG_COMPILER_GCC)\$(CONFIG_LP_COMPILER_GCC),y)
+ NM_${TARCH}:=${GCCPREFIX}gcc-nm
+ AR_${TARCH}:=${GCCPREFIX}gcc-ar
+else
+ NM_${TARCH}:=${GCCPREFIX}nm
+ AR_${TARCH}:=${GCCPREFIX}ar
+endif
OBJCOPY_${TARCH}:=${GCCPREFIX}objcopy
OBJDUMP_${TARCH}:=${GCCPREFIX}objdump
READELF_${TARCH}:=${GCCPREFIX}readelf
STRIP_${TARCH}:=${GCCPREFIX}strip
-AR_${TARCH}:=${GCCPREFIX}ar
GNATBIND_${TARCH}:=${GCCPREFIX}gnatbind
CROSS_COMPILE_${TARCH}:=${GCCPREFIX}


To view, visit change 38290. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ibdae4faabf67bf6a4bb8c38970f6189646ee74b3
Gerrit-Change-Number: 38290
Gerrit-PatchSet: 7
Gerrit-Owner: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: David Hendricks <david.hendricks@gmail.com>
Gerrit-Reviewer: HAOUAS Elyes <ehaouas@noos.fr>
Gerrit-Reviewer: Jacob Garber <jgarber1@ualberta.ca>
Gerrit-Reviewer: Julius Werner <jwerner@chromium.org>
Gerrit-Reviewer: Martin Roth <martinroth@google.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged