File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,18 @@ core-y += $(ARCH_DIR)/kernel/ \
2020
2121MODE_INCLUDE += -I$(srctree ) /$(ARCH_DIR ) /include/shared/skas
2222
23+ HEADER_ARCH := $(SUBARCH )
24+
25+ # Additional ARCH settings for x86
26+ ifeq ($(SUBARCH ) ,i386)
27+ HEADER_ARCH := x86
28+ endif
29+ ifeq ($(SUBARCH ) ,x86_64)
30+ HEADER_ARCH := x86
31+ endif
32+
2333include $(srctree ) /$(ARCH_DIR ) /Makefile-skas
24- include $(srctree ) /$(ARCH_DIR ) /Makefile-$(SUBARCH )
34+ include $(srctree ) /$(ARCH_DIR ) /Makefile-$(HEADER_ARCH )
2535
2636SHARED_HEADERS := $(ARCH_DIR ) /include/shared
2737ARCH_INCLUDE := -I$(srctree ) /$(SHARED_HEADERS )
Original file line number Diff line number Diff line change 11core-y += arch/um/sys-x86/ arch/x86/crypto/
22
3+ ifeq ($(CONFIG_X86_32),y)
34START := 0x8048000
45
56LDFLAGS += -m elf_i386
67ELF_ARCH := i386
78ELF_FORMAT := elf32-i386
8- HEADER_ARCH := x86
99CHECKFLAGS += -D__i386__
1010
1111ifeq ("$(origin SUBARCH)", "command line")
@@ -36,3 +36,26 @@ KBUILD_CFLAGS += $(shell if [ $(call cc-version) -lt 0400 ] ; then \
3636 else echo $(call cc-option,-funit-at-a-time); fi ;)
3737
3838KBUILD_CFLAGS += $(cflags-y)
39+
40+ else
41+
42+ START := 0x60000000
43+
44+ KBUILD_CFLAGS += -fno-builtin -m64
45+
46+ CHECKFLAGS += -m64 -D__x86_64__
47+ KBUILD_AFLAGS += -m64
48+ LDFLAGS += -m elf_x86_64
49+ KBUILD_CPPFLAGS += -m64
50+
51+ ELF_ARCH := i386:x86-64
52+ ELF_FORMAT := elf64-x86-64
53+
54+ # Not on all 64-bit distros /lib is a symlink to /lib64. PLD is an example.
55+
56+ LINK-$(CONFIG_LD_SCRIPT_DYN) += -Wl,-rpath,/lib64
57+ LINK-y += -m64
58+
59+ # Do unit-at-a-time unconditionally on x86_64, following the host
60+ KBUILD_CFLAGS += $(call cc-option,-funit-at-a-time)
61+ endif
Load diff This file was deleted.
You can’t perform that action at this time.
0 commit comments