Something went wrong. Try again.
(I'm so sorry!) Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116# SPDX-License-Identifier: GPL-2.0-only## Copyright (C) 2004, 2007-2010, 2011-2012 Synopsys, Inc. (www.synopsys.com)#
KBUILD_DEFCONFIG := haps_hs_smp_defconfig
ifeq ($(CROSS_COMPILE),)CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux- arc-linux-gnu-)endif
cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -mswape -D__linux__
tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mcpu=arc700tune-mcpu-def-$(CONFIG_ISA_ARCV2) := -mcpu=hs38
ifeq ($(CONFIG_ARC_TUNE_MCPU),)cflags-y += $(tune-mcpu-def-y)elsetune-mcpu := $(CONFIG_ARC_TUNE_MCPU)ifneq ($(call cc-option,$(tune-mcpu)),)cflags-y += $(tune-mcpu)else# The flag provided by 'CONFIG_ARC_TUNE_MCPU' option isn't known by this compiler# (probably the compiler is too old). Use ISA default mcpu flag instead as a safe option.$(warning ** WARNING ** CONFIG_ARC_TUNE_MCPU flag '$(tune-mcpu)' is unknown, fallback to '$(tune-mcpu-def-y)')cflags-y += $(tune-mcpu-def-y)endifendif
ifdef CONFIG_ARC_CURR_IN_REG# For a global register definition, make sure it gets passed to every file# We had a customer reported bug where some code built in kernel was NOT using# any kernel headers, and missing the global register# Can't do unconditionally because of recursive include issues# due to <linux/thread_info.h>LINUXINCLUDE += -include $(srctree)/arch/arc/include/asm/current.hcflags-y += -ffixed-gpendif
cflags-y += -fsection-anchors
cflags-$(CONFIG_ARC_HAS_LLSC) += -mlock
ifdef CONFIG_ISA_ARCV2
ifdef CONFIG_ARC_USE_UNALIGNED_MEM_ACCESScflags-y += -munaligned-accesselsecflags-y += -mno-unaligned-accessendif
ifndef CONFIG_ARC_HAS_LL64cflags-y += -mno-ll64endif
ifndef CONFIG_ARC_HAS_DIV_REMcflags-y += -mno-div-remendif
endif
cfi := $(call as-instr,.cfi_startproc\n.cfi_endproc,-DARC_DW2_UNWIND_AS_CFI)cflags-$(CONFIG_ARC_DW2_UNWIND) += -fasynchronous-unwind-tables $(cfi)
# small data is default for elf32 tool-chain. If not usable, disable it# This also allows repurposing GP as scratch reg to gcc reg allocatordisable_small_data := ycflags-$(disable_small_data) += -mno-sdata
cflags-$(CONFIG_CPU_BIG_ENDIAN) += -mbig-endianldflags-$(CONFIG_CPU_BIG_ENDIAN) += -EB
LIBGCC = $(shell $(CC) $(cflags-y) --print-libgcc-file-name)
# Modules with short calls might break for calls into builtin-kernelKBUILD_CFLAGS_MODULE += -mlong-calls -mno-millicode
# Finally dump eveything into kernel build systemKBUILD_CFLAGS += $(cflags-y)KBUILD_AFLAGS += $(KBUILD_CFLAGS)KBUILD_LDFLAGS += $(ldflags-y)
core-y += arch/arc/plat-sim/core-$(CONFIG_ARC_PLAT_TB10X) += arch/arc/plat-tb10x/core-$(CONFIG_ARC_PLAT_AXS10X) += arch/arc/plat-axs10x/core-$(CONFIG_ARC_SOC_HSDK) += arch/arc/plat-hsdk/
libs-y += arch/arc/lib/
ifdef CONFIG_DEBUG_INFO_BTFexport LIBGCC := $(LIBGCC)libs-y += arch/arc/lib/libgcc.aelselibs-y += $(LIBGCC)endif
boot := arch/arc/boot
boot_targets := uImage.bin uImage.gz uImage.lzma
PHONY += $(boot_targets)$(boot_targets): vmlinux $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
uimage-default-y := uImage.binuimage-default-$(CONFIG_KERNEL_GZIP) := uImage.gzuimage-default-$(CONFIG_KERNEL_LZMA) := uImage.lzma
PHONY += uImageuImage: $(uimage-default-y) @ln -sf $< $(boot)/uImage @$(kecho) ' Image $(boot)/uImage is ready'
CLEAN_FILES += $(boot)/uImage