Skip to content

Commit 1d77416

Browse files
committed
Accept CROSS_PREFIX
Signed-off-by: Jiaxun Yang <[email protected]>
1 parent 29919c4 commit 1d77416

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

GNUmakefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,18 @@ endif
1717
# Default user QEMU flags. These are appended to the QEMU command calls.
1818
QEMUFLAGS := -m 2G
1919

20+
# User controllable cross compiler prefix.
21+
CROSS_PREFIX :=
22+
2023
# User controllable C compiler command.
21-
CC := cc
24+
ifneq ($(CROSS_PREFIX),)
25+
CC := $(CROSS_PREFIX)gcc
26+
else
27+
CC := cc
28+
endif
2229

2330
# User controllable objcopy command.
24-
OBJCOPY := objcopy
31+
OBJCOPY := $(CROSS_PREFIX)objcopy
2532

2633
# User controllable C flags.
2734
CFLAGS := -g -O2 -pipe

0 commit comments

Comments
 (0)