Makefile (ea88eeac0cb8328014b53d80ca631e8dc0dc18dc) Makefile (ffee0de411fd4f74f3b788892eeb075abbf26c52)
1# Unified Makefile for i386 and x86_64
2
3# select defconfig based on actual architecture
4ifeq ($(ARCH),x86)
1# Unified Makefile for i386 and x86_64
2
3# select defconfig based on actual architecture
4ifeq ($(ARCH),x86)
5 ifeq ($(shell uname -m),x86_64)
6 KBUILD_DEFCONFIG := x86_64_defconfig
7 else
5 KBUILD_DEFCONFIG := i386_defconfig
8 KBUILD_DEFCONFIG := i386_defconfig
9 endif
6else
7 KBUILD_DEFCONFIG := $(ARCH)_defconfig
8endif
9
10# BITS is used as extension for files which are available in a 32 bit
11# and a 64 bit version to simplify shared Makefiles.
12# e.g.: obj-y += foo_$(BITS).o
13export BITS

--- 104 unchanged lines hidden (view full) ---

118cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1)
119# is .cfi_signal_frame supported too?
120cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
121cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
122
123# does binutils support specific instructions?
124asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
125avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1)
10else
11 KBUILD_DEFCONFIG := $(ARCH)_defconfig
12endif
13
14# BITS is used as extension for files which are available in a 32 bit
15# and a 64 bit version to simplify shared Makefiles.
16# e.g.: obj-y += foo_$(BITS).o
17export BITS

--- 104 unchanged lines hidden (view full) ---

122cfi := $(call as-instr,.cfi_startproc\n.cfi_rel_offset $(sp-y)$(comma)0\n.cfi_endproc,-DCONFIG_AS_CFI=1)
123# is .cfi_signal_frame supported too?
124cfi-sigframe := $(call as-instr,.cfi_startproc\n.cfi_signal_frame\n.cfi_endproc,-DCONFIG_AS_CFI_SIGNAL_FRAME=1)
125cfi-sections := $(call as-instr,.cfi_sections .debug_frame,-DCONFIG_AS_CFI_SECTIONS=1)
126
127# does binutils support specific instructions?
128asinstr := $(call as-instr,fxsaveq (%rax),-DCONFIG_AS_FXSAVEQ=1)
129avx_instr := $(call as-instr,vxorps %ymm0$(comma)%ymm1$(comma)%ymm2,-DCONFIG_AS_AVX=1)
126avx2_instr :=$(call as-instr,vpbroadcastb %xmm0$(comma)%ymm1,-DCONFIG_AS_AVX2=1)
127
130
128KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr)
129KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr) $(avx2_instr)
131KBUILD_AFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
132KBUILD_CFLAGS += $(cfi) $(cfi-sigframe) $(cfi-sections) $(asinstr) $(avx_instr)
130
131LDFLAGS := -m elf_$(UTS_MACHINE)
132
133# Speed up the build
134KBUILD_CFLAGS += -pipe
135# Workaround for a gcc prelease that unfortunately was shipped in a suse release
136KBUILD_CFLAGS += -Wno-sign-compare
137#

--- 95 unchanged lines hidden ---
133
134LDFLAGS := -m elf_$(UTS_MACHINE)
135
136# Speed up the build
137KBUILD_CFLAGS += -pipe
138# Workaround for a gcc prelease that unfortunately was shipped in a suse release
139KBUILD_CFLAGS += -Wno-sign-compare
140#

--- 95 unchanged lines hidden ---