|
@@ -4,10 +4,21 @@ SRCDIRS += arch/arm64/core
|
4
|
4
|
|
5
|
5
|
# ARM64-specific flags
|
6
|
6
|
#
|
7
|
|
-CFLAGS += -mabi=lp64 -mlittle-endian -mcmodel=small
|
|
7
|
+CFLAGS += -mlittle-endian -mcmodel=small
|
8
|
8
|
CFLAGS += -fomit-frame-pointer
|
9
|
9
|
ASFLAGS += -mabi=lp64 -EL
|
10
|
10
|
|
|
11
|
+# We want to specify the LP64 model. There is an explicit -mabi=lp64
|
|
12
|
+# on GCC 4.9 and later, and no guarantee as to which is the default
|
|
13
|
+# model. In earlier versions of GCC, there is no -mabi option and the
|
|
14
|
+# default appears to be LP64 anyway.
|
|
15
|
+#
|
|
16
|
+ifeq ($(CCTYPE),gcc)
|
|
17
|
+LP64_TEST = $(CC) -mabi=lp64 -x c -c /dev/null -o /dev/null >/dev/null 2>&1
|
|
18
|
+LP64_FLAGS := $(shell $(LP64_TEST) && $(ECHO) '-mabi=lp64')
|
|
19
|
+WORKAROUND_CFLAGS += $(LP64_FLAGS)
|
|
20
|
+endif
|
|
21
|
+
|
11
|
22
|
# EFI requires -fshort-wchar, and nothing else currently uses wchar_t
|
12
|
23
|
#
|
13
|
24
|
CFLAGS += -fshort-wchar
|