comparison src/makefile-armclang @ 20:33c9000056b5

use cortex-a15
author kono
date Sat, 07 Apr 2018 15:50:32 +0900
parents d058830337d9
children
comparison
equal deleted inserted replaced
19:bf2f70fa8852 20:33c9000056b5
1 # specify path to QEMU, installed with MacPorts 1 # specify path to QEMU, installed with MacPorts
2 QEMU = qemu-system-arm 2 QEMU = qemu-system-arm
3 3
4 CPU = armv8
5 QEMUCPU = cortex-a15
4 include makefile.inc 6 include makefile.inc
5 CPU = armv6
6 CC = /usr/local/cbclang/bin/clang 7 CC = /usr/local/cbclang/bin/clang
7 AS = arm-linux-gnu-as 8 AS = arm-linux-gnu-as
8 LD = arm-linux-gnu-ld 9 LD = arm-linux-gnu-ld
9 OBJCOPY = arm-linux-gnu-objcopy 10 OBJCOPY = arm-linux-gnu-objcopy
10 OBJDUMP = arm-linux-gnu-objdump 11 OBJDUMP = arm-linux-gnu-objdump
11 12
12 # CFLAGS = -march=armv6 -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0 13 # CFLAGS = -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -Werror -I. -g -O0
13 CFLAGS = -target arm-linux-gnueabihf -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -I ../cbclang/arm -g -O0 14 CFLAGS = -target ${CPU}-linux-gnueabihf -march=${CPU} -fno-pic -static -fno-builtin -fno-strict-aliasing -Wall -I. -I ../cbclang/arm -g -O0
14 LDFLAGS = --noinhibit-exec 15 LDFLAGS = --noinhibit-exec
15 # ASFLAGS = -march=armv6 16 # ASFLAGS = -march=${CPU}
16 ASFLAGS = -target arm-linux-gnueabihf 17 ASFLAGS = -target ${CPU}-linux-gnueabihf
17 18
18 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name) 19 LIBGCC = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
19 20
20 # link the libgcc.a for __aeabi_idiv. ARM has no native support for div 21 # link the libgcc.a for __aeabi_idiv. ARM has no native support for div
21 LIBS =/net/open/RaspberryPi/rasbian-img/usr/lib/gcc/arm-linux-gnueabihf/6/libgcc.a 22 LIBS =/net/open/RaspberryPi/rasbian-img/usr/lib/gcc/arm-linux-gnueabihf/6/libgcc.a
63 rm -f initcode fs.img 64 rm -f initcode fs.img
64 65
65 qemu: kernel.elf 66 qemu: kernel.elf
66 @clear 67 @clear
67 @echo "Press Ctrl-A and then X to terminate QEMU session\n" 68 @echo "Press Ctrl-A and then X to terminate QEMU session\n"
68 export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu arm1176 -nographic -soundhw hda -kernel kernel.elf 69 export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu ${QEMUCPU} -nographic -soundhw hda -kernel kernel.elf
69 70
70 qemu-debug : kernel.elf 71 qemu-debug : kernel.elf
71 @clear 72 @clear
72 @echo "Press Ctrl-A and then X to terminate QEMU session\n" 73 @echo "Press Ctrl-A and then X to terminate QEMU session\n"
73 export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu arm1176 -nographic -singlestep -d exec,cpu,guest_errors -D qemu.log -kernel kernel.elf -s -S 74 export QEMU_AUDIO_DRV=none ; $(QEMU) -M versatilepb -m 128 -cpu ${QEMUCPU} -nographic -singlestep -d exec,cpu,guest_errors -D qemu.log -kernel kernel.elf -s -S
74 75
75 INITCODE_OBJ = initcode.o 76 INITCODE_OBJ = initcode.o
76 $(addprefix build/,$(INITCODE_OBJ)): initcode.S 77 $(addprefix build/,$(INITCODE_OBJ)): initcode.S
77 $(call build-directory) 78 $(call build-directory)
78 $(call AS_WITH, -nostdinc -I.) 79 $(call AS_WITH, -nostdinc -I.)