Commit a7dd2604 authored by Jeff Dike's avatar Jeff Dike

Updated to build with the 2.5.39 kbuild.

parent 631516bb
...@@ -36,9 +36,8 @@ ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \ ...@@ -36,9 +36,8 @@ ARCH_SUBDIRS = $(ARCH_DIR)/drivers $(ARCH_DIR)/kernel \
SUBDIRS += $(ARCH_SUBDIRS) SUBDIRS += $(ARCH_SUBDIRS)
core-y += $(ARCH_DIR)/kernel/ \ core-y += $(ARCH_DIR)/kernel/ \
+= $(ARCH_DIR)/drivers/ \ $(ARCH_DIR)/drivers/ \
+= $(ARCH_DIR)/sys-$(SUBARCH)/ \ $(ARCH_DIR)/sys-$(SUBARCH)/
+= $(ARCH_DIR)/os-$(OS)/
libs-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/ libs-$(CONFIG_PT_PROXY) += $(ARCH_DIR)/ptproxy/
...@@ -53,15 +52,17 @@ CFLAGS += $(DEBUG) $(PROFILE) $(ARCH_CFLAGS) -D__arch_um__ \ ...@@ -53,15 +52,17 @@ CFLAGS += $(DEBUG) $(PROFILE) $(ARCH_CFLAGS) -D__arch_um__ \
-DSUBARCH=\"$(SUBARCH)\" -D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) \ -DSUBARCH=\"$(SUBARCH)\" -D_LARGEFILE64_SOURCE -I$(ARCH_INCLUDE) \
-Derrno=kernel_errno -Derrno=kernel_errno
LDFLAGS += -r
LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc
SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000)
$(ARCH_DIR)/link.ld: $(ARCH_DIR)/link.ld.in $(ARCH_DIR)/uml.lds.s : $(ARCH_DIR)/uml.lds.S
m4 -DSTART=$$(($(TOP_ADDR) - $(SIZE))) -DELF_ARCH=$(ELF_ARCH) \ $(call if_changed_dep,as_s_S)
-DELF_FORMAT=$(ELF_FORMAT) $< > $@
AFLAGS_uml.lds.o = -U$(SUBARCH) -DSTART=$$(($(TOP_ADDR) - $(SIZE))) \
-DELF_ARCH=$(ELF_ARCH) -DELF_FORMAT=\"$(ELF_FORMAT)\" -P -C -Uum
LDFLAGS_vmlinux = -r $(ARCH_DIR)/main.o
SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \ SYMLINK_HEADERS = include/asm-um/archparam.h include/asm-um/system.h \
include/asm-um/sigcontext.h include/asm-um/processor.h \ include/asm-um/sigcontext.h include/asm-um/processor.h \
...@@ -72,11 +73,13 @@ ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep arch/um/os \ ...@@ -72,11 +73,13 @@ ARCH_SYMLINKS = include/asm-um/arch arch/um/include/sysdep arch/um/os \
GEN_HEADERS = $(ARCH_DIR)/include/task.h GEN_HEADERS = $(ARCH_DIR)/include/task.h
linux: scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) $(ARCH_DIR)/main.o \ $(ARCH_DIR)/vmlinux.lds.S :
vmlinux $(ARCH_DIR)/link.ld touch $@
mv vmlinux vmlinux.o
$(CC) -Wl,-T,$(ARCH_DIR)/link.ld $(LINK_PROFILE) $(LINK_WRAPS) \ linux: scripts $(ARCH_SYMLINKS) $(SYS_HEADERS) $(GEN_HEADERS) \
-o linux -static $(ARCH_DIR)/main.o vmlinux.o -L/usr/lib -lutil arch/um/uml.lds.s vmlinux
$(CC) -Wl,-T,arch/um/uml.lds.s -o $@ $(LINK_PROFILE) \
$(LINK_WRAPS) -static vmlinux -L/usr/lib -lutil
USER_CFLAGS := $(patsubst -I%,,$(CFLAGS)) USER_CFLAGS := $(patsubst -I%,,$(CFLAGS))
USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS)) USER_CFLAGS := $(patsubst -Derrno=kernel_errno,,$(USER_CFLAGS))
......
...@@ -3,5 +3,4 @@ ...@@ -3,5 +3,4 @@
# Licensed under the GPL # Licensed under the GPL
# #
SUBDIRS += $(ARCH_DIR)/os-$(OS)/drivers core-y += $(ARCH_DIR)/os-$(OS)/
LIBS += $(ARCH_DIR)/os-$(OS)/drivers/drivers.o
...@@ -10,7 +10,6 @@ obj-y = config.o exec_kern.o exec_user.o exitcode.o frame_kern.o frame.o \ ...@@ -10,7 +10,6 @@ obj-y = config.o exec_kern.o exec_user.o exitcode.o frame_kern.o frame.o \
umid.o user_util.o umid.o user_util.o
obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o obj-$(CONFIG_BLK_DEV_INITRD) += initrd_kern.o initrd_user.o
endif
# user_syms.o not included here because Rules.make has its own ideas about # user_syms.o not included here because Rules.make has its own ideas about
# building anything in export-objs # building anything in export-objs
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment