45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
--- a/Make.common
|
|
+++ b/Make.common
|
|
@@ -40,21 +40,13 @@
|
|
# Note: TIANOBASE is defined in master Makefile and exported
|
|
GENFW = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
|
|
prefix = /usr/bin/
|
|
-ifeq ($(ARCH),aarch64)
|
|
- CC = $(prefix)aarch64-linux-gnu-gcc
|
|
- AS = $(prefix)aarch64-linux-gnu-as
|
|
- LD = $(prefix)aarch64-linux-gnu-ld
|
|
- AR = $(prefix)aarch64-linux-gnu-ar
|
|
- RANLIB = $(prefix)aarch64-linux-gnu-ranlib
|
|
- OBJCOPY = $(prefix)aarch64-linux-gnu-objcopy
|
|
-else
|
|
- CC = $(prefix)gcc
|
|
- AS = $(prefix)as
|
|
- LD = $(prefix)ld
|
|
- AR = $(prefix)ar
|
|
- RANLIB = $(prefix)ranlib
|
|
- OBJCOPY = $(prefix)objcopy
|
|
-endif
|
|
+
|
|
+CC = $(prefix)$(CROSS_COMPILE)gcc
|
|
+AS = $(prefix)$(CROSS_COMPILE)as
|
|
+LD = $(prefix)$(CROSS_COMPILE)ld
|
|
+AR = $(prefix)$(CROSS_COMPILE)ar
|
|
+RANLIB = $(prefix)$(CROSS_COMPILE)ranlib
|
|
+OBJCOPY = $(prefix)$(CROSS_COMPILE)objcopy
|
|
|
|
ifeq ($(MAKEWITH),TIANO)
|
|
# Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)
|
|
@@ -148,8 +140,10 @@
|
|
|
|
ifeq ($(ARCH), aarch64)
|
|
GNUEFI_CFLAGS += -DEFIAARCH64
|
|
- FORMAT = -O binary
|
|
- FORMAT_DRIVER = -O binary
|
|
+ ifneq ($(OBJCOPY_LT_2_38),)
|
|
+ FORMAT = -O binary
|
|
+ FORMAT_DRIVER = -O binary
|
|
+ endif
|
|
SUBSYSTEM_LDFLAG = -defsym=EFI_SUBSYSTEM=0xa
|
|
LDFLAGS += --warn-common --no-undefined --fatal-warnings
|
|
|