Blame view
arch/sparc/Makefile
2.68 KB
b24413180
|
1 |
# SPDX-License-Identifier: GPL-2.0 |
1da177e4c
|
2 3 4 5 |
# # sparc/Makefile # # Makefile for the architecture dependent flags and dependencies on the |
5e5387900
|
6 |
# Sparc and sparc64. |
1da177e4c
|
7 |
# |
5e5387900
|
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# Copyright (C) 1994,1996,1998 David S. Miller (davem@caip.rutgers.edu) # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz) # We are not yet configured - so test on arch ifeq ($(ARCH),sparc) KBUILD_DEFCONFIG := sparc32_defconfig else KBUILD_DEFCONFIG := sparc64_defconfig endif ifeq ($(CONFIG_SPARC32),y) ##### # sparc32 |
1da177e4c
|
21 |
# |
b0cdd599d
|
22 |
CHECKFLAGS += -D__sparc__ |
38753586a
|
23 |
LDFLAGS := -m elf32_sparc |
b0cdd599d
|
24 |
export BITS := 32 |
7f5620a5f
|
25 |
UTS_MACHINE := sparc |
1da177e4c
|
26 |
|
22be3b105
|
27 28 29 30 |
# We are adding -Wa,-Av8 to KBUILD_CFLAGS to deal with a specs bug in some # versions of gcc. Some gcc versions won't pass -Av8 to binutils when you # give -mcpu=v8. This silently worked with older bintutils versions but # does not any more. |
38753586a
|
31 |
KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7 |
22be3b105
|
32 |
KBUILD_CFLAGS += -Wa,-Av8 |
38753586a
|
33 |
KBUILD_AFLAGS += -m32 -Wa,-Av8 |
1da177e4c
|
34 |
|
5e5387900
|
35 36 37 38 |
else ##### # sparc64 # |
38753586a
|
39 40 41 42 |
CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64 LDFLAGS := -m elf64_sparc export BITS := 64 UTS_MACHINE := sparc64 |
5e5387900
|
43 |
|
38753586a
|
44 45 46 |
KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare KBUILD_CFLAGS += -Wa,--undeclared-regs |
5e5387900
|
47 48 49 50 51 52 53 54 |
KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3) KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs ifeq ($(CONFIG_MCOUNT),y) KBUILD_CFLAGS += -pg endif endif |
1da177e4c
|
55 |
|
a88b5ba8b
|
56 |
head-y := arch/sparc/kernel/head_$(BITS).o |
5e5387900
|
57 |
|
e1d7de837
|
58 59 |
# See arch/sparc/Kbuild for the core part of the kernel core-y += arch/sparc/ |
5e5387900
|
60 |
|
5de18cde3
|
61 |
libs-y += arch/sparc/prom/ |
478b8fecd
|
62 |
libs-y += arch/sparc/lib/ |
1da177e4c
|
63 |
|
bdde6b3c8
|
64 |
drivers-$(CONFIG_PM) += arch/sparc/power/ |
9550e59c4
|
65 |
drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/ |
a8c601ca2
|
66 |
boot := arch/sparc/boot |
1da177e4c
|
67 |
|
48e46b7b3
|
68 69 |
# Default target all: zImage |
684151a75
|
70 |
image zImage uImage tftpboot.img vmlinux.aout: vmlinux |
a8c601ca2
|
71 |
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@ |
1da177e4c
|
72 |
|
c78f77e20
|
73 74 |
install: $(Q)$(MAKE) $(build)=$(boot) $@ |
1da177e4c
|
75 |
archclean: |
a8c601ca2
|
76 |
$(Q)$(MAKE) $(clean)=$(boot) |
1da177e4c
|
77 |
|
349101da8
|
78 |
# This is the image used for packaging |
a8c601ca2
|
79 |
KBUILD_IMAGE := $(boot)/zImage |
349101da8
|
80 |
|
1da177e4c
|
81 |
# Don't use tabs in echo arguments. |
5e5387900
|
82 |
ifeq ($(ARCH),sparc) |
1da177e4c
|
83 84 |
define archhelp echo '* image - kernel image ($(boot)/image)' |
349101da8
|
85 |
echo '* zImage - stripped kernel image ($(boot)/zImage)' |
684151a75
|
86 |
echo ' uImage - U-Boot SPARC32 Image (only for LEON)' |
1da177e4c
|
87 88 |
echo ' tftpboot.img - image prepared for tftp' endef |
5e5387900
|
89 90 |
else define archhelp |
48e46b7b3
|
91 92 93 |
echo '* vmlinux - standard sparc64 kernel' echo '* zImage - stripped and compressed sparc64 kernel ($(boot)/zImage)' echo ' vmlinux.aout - a.out kernel for sparc64' |
5e5387900
|
94 95 96 |
echo ' tftpboot.img - image prepared for tftp' endef endif |