build: prefer `gcc-ar` over `ar`
The `gcc-ar` wrapper exists to make it easier to support LTO on some
versions of GCC. The two commands are compatible, accepting exactly the
same arguments, so this change moves us to `gcc-ar` to ensure that we
are configuring LTO correctly.
Change-Id: I24a4cfaad29d35b09f847299081f83ca9b41aa8a
Signed-off-by: Chris Kay <chris.kay@arm.com>
diff --git a/Makefile b/Makefile
index 2dc2956..3267660 100644
--- a/Makefile
+++ b/Makefile
@@ -102,7 +102,7 @@
CC := ${CROSS_COMPILE}gcc
CPP := ${CROSS_COMPILE}gcc -E
AS := ${CROSS_COMPILE}gcc
-AR := ${CROSS_COMPILE}ar
+AR := ${CROSS_COMPILE}gcc-ar
LINKER := ${CROSS_COMPILE}ld
OC := ${CROSS_COMPILE}objcopy
OD := ${CROSS_COMPILE}objdump
diff --git a/lib/romlib/Makefile b/lib/romlib/Makefile
index 8a43744..3b62aaa 100644
--- a/lib/romlib/Makefile
+++ b/lib/romlib/Makefile
@@ -5,7 +5,7 @@
#
AS = $(CROSS_COMPILE)gcc
-AR = $(CROSS_COMPILE)ar
+AR = $(CROSS_COMPILE)gcc-ar
LD = $(CROSS_COMPILE)ld
OC = $(CROSS_COMPILE)objcopy
CPP = $(CROSS_COMPILE)gcc -E
diff --git a/plat/rockchip/rk3399/drivers/m0/Makefile b/plat/rockchip/rk3399/drivers/m0/Makefile
index 1763246..8783269 100644
--- a/plat/rockchip/rk3399/drivers/m0/Makefile
+++ b/plat/rockchip/rk3399/drivers/m0/Makefile
@@ -41,7 +41,7 @@
# Cross tool
CC := ${M0_CROSS_COMPILE}gcc
CPP := ${M0_CROSS_COMPILE}gcc -E
-AR := ${M0_CROSS_COMPILE}ar
+AR := ${M0_CROSS_COMPILE}gcc-ar
OC := ${M0_CROSS_COMPILE}objcopy
OD := ${M0_CROSS_COMPILE}objdump
NM := ${M0_CROSS_COMPILE}nm