2005-04-17 06:20:36 +08:00
|
|
|
#
|
|
|
|
# ia64/Makefile
|
|
|
|
#
|
2006-03-06 06:14:10 +08:00
|
|
|
# This file is included by the global makefile so that you can add your own
|
|
|
|
# architecture-specific flags and dependencies.
|
|
|
|
#
|
2005-04-17 06:20:36 +08:00
|
|
|
# This file is subject to the terms and conditions of the GNU General Public
|
|
|
|
# License. See the file "COPYING" in the main directory of this archive
|
|
|
|
# for more details.
|
|
|
|
#
|
|
|
|
# Copyright (C) 1998-2004 by David Mosberger-Tang <davidm@hpl.hp.com>
|
|
|
|
#
|
|
|
|
|
2008-02-27 03:54:46 +08:00
|
|
|
KBUILD_DEFCONFIG := generic_defconfig
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
NM := $(CROSS_COMPILE)nm -B
|
|
|
|
|
2018-05-31 04:48:38 +08:00
|
|
|
CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
OBJCOPYFLAGS := --strip-all
|
|
|
|
LDFLAGS_vmlinux := -static
|
2010-07-29 01:11:27 +08:00
|
|
|
KBUILD_AFLAGS_KERNEL := -mconstant-gp
|
2005-04-17 06:20:36 +08:00
|
|
|
EXTRA :=
|
|
|
|
|
|
|
|
cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
|
|
|
|
-falign-functions=32 -frename-registers -fno-optimize-sibling-calls
|
2010-07-29 01:11:27 +08:00
|
|
|
KBUILD_CFLAGS_KERNEL := -mconstant-gp
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
|
2007-10-16 04:17:25 +08:00
|
|
|
KBUILD_CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
ifeq ($(GAS_STATUS),buggy)
|
|
|
|
$(error Sorry, you need a newer version of the assember, one that is built from \
|
|
|
|
a source-tree that post-dates 18-Dec-2002. You can find a pre-compiled \
|
|
|
|
static binary of such an assembler at: \
|
|
|
|
\
|
|
|
|
ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
|
|
|
|
endif
|
|
|
|
|
2019-08-13 15:25:03 +08:00
|
|
|
quiet_cmd_gzip = GZIP $@
|
kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
Redefine GZIP, BZIP2, LZOP variables as KGZIP, KBZIP2, KLZOP resp.
GZIP, BZIP2, LZOP env variables are reserved by the tools. The original
attempt to redefine them internally doesn't work in makefiles/scripts
intercall scenarios, e.g., "make GZIP=gzip bindeb-pkg" and results in
broken builds. There can be other broken build commands because of this,
so the universal solution is to use non-reserved env variables for the
compression tools.
Fixes: 8dfb61dcbace ("kbuild: add variables for compression tools")
Signed-off-by: Denis Efremov <efremov@linux.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2020-06-08 17:59:44 +08:00
|
|
|
cmd_gzip = cat $(real-prereqs) | $(KGZIP) -n -f -9 > $@
|
2019-08-13 15:25:03 +08:00
|
|
|
|
|
|
|
quiet_cmd_objcopy = OBJCOPY $@
|
|
|
|
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@
|
|
|
|
|
2007-10-15 04:21:35 +08:00
|
|
|
KBUILD_CFLAGS += $(cflags-y)
|
2018-01-02 23:12:01 +08:00
|
|
|
head-y := arch/ia64/kernel/head.o
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
libs-y += arch/ia64/lib/
|
|
|
|
|
2019-08-13 15:25:12 +08:00
|
|
|
drivers-y += arch/ia64/pci/ arch/ia64/hp/common/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2019-08-13 15:25:03 +08:00
|
|
|
PHONY += compressed check
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
all: compressed unwcheck
|
|
|
|
|
|
|
|
compressed: vmlinux.gz
|
|
|
|
|
2006-06-07 00:23:34 +08:00
|
|
|
vmlinuz: vmlinux.gz
|
|
|
|
|
2019-08-13 15:25:03 +08:00
|
|
|
vmlinux.gz: vmlinux.bin FORCE
|
|
|
|
$(call if_changed,gzip)
|
|
|
|
|
|
|
|
vmlinux.bin: vmlinux FORCE
|
|
|
|
$(call if_changed,objcopy)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
unwcheck: vmlinux
|
2021-02-01 09:00:24 +08:00
|
|
|
-$(Q)READELF=$(READELF) $(PYTHON3) $(srctree)/arch/ia64/scripts/unwcheck.py $<
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2018-11-13 14:57:45 +08:00
|
|
|
archheaders:
|
|
|
|
$(Q)$(MAKE) $(build)=arch/ia64/kernel/syscalls all
|
|
|
|
|
2019-08-13 15:25:03 +08:00
|
|
|
CLEAN_FILES += vmlinux.gz
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2022-04-30 20:16:38 +08:00
|
|
|
install:
|
|
|
|
sh $(srctree)/arch/ia64/install.sh $(KERNELRELEASE) vmlinux.gz System.map "$(INSTALL_PATH)"
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
define archhelp
|
|
|
|
echo '* compressed - Build compressed kernel image'
|
|
|
|
echo ' install - Install compressed kernel image'
|
|
|
|
echo '* unwcheck - Check vmlinux for invalid unwind info'
|
|
|
|
endef
|