Return-Path: Received: from sc8-sf-mx1-b.sourceforge.net ([10.3.1.11] helo=sc8-sf-mx1.sourceforge.net) by sc8-sf-list1.sourceforge.net with esmtp (Exim 4.24) id 1AZEYf-0008Fe-TK for user-mode-linux-devel@lists.sourceforge.net; Wed, 24 Dec 2003 11:20:37 -0800 Received: from smtp005.mail.ukl.yahoo.com ([217.12.11.36]) by sc8-sf-mx1.sourceforge.net with smtp (Exim 4.24) id 1AZEYe-00047S-W3 for user-mode-linux-devel@lists.sourceforge.net; Wed, 24 Dec 2003 11:20:37 -0800 From: BlaisorBlade MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_7ae6/aoV5+s4l/l" Message-Id: <200312242019.23335.blaisorblade_work@yahoo.it> Subject: [uml-devel] Needed help for UML kbuild. Sender: user-mode-linux-devel-admin@lists.sourceforge.net Errors-To: user-mode-linux-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: The user-mode Linux development list List-Post: List-Help: List-Subscribe: , List-Archive: Date: Wed, 24 Dec 2003 20:19:23 +0100 To: kbuild-devel@lists.sourceforge.net Cc: user-mode-linux-devel@lists.sourceforge.net --Boundary-00=_7ae6/aoV5+s4l/l Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline I'm a UML(User mode linux, the arch/um folder in 2.5/2.6) developer, and I need some support to update its build system to the 2.6 changes. The problem is that since that port of Linux runs as a normal process and emulates a whole box, some of its source files must be compiled against user-space headers and without some flags; this cannot be handled simply by setting CFLAGS_, as the problematic flags are added by scripts/Makefile.lib itself; so I've prepared a patch(that I attached) which recognizes these objects to compile them properly. This patch will need to go in stock 2.6 and mustn't interfere with the rest of the kernel compilation, so I especially want to hear from you. The "stuff" part of it will be sent to the UML developers; it's just changing the Uml makefiles to use the new way of working. The "main" must be reviewed here, especially for the scripts/Makefile.lib; the Makefile.build change is just cosmetic(changing the shown tag; I must change it more to fix the filename alignment; but why don't you use a tab for this?). The Makefile.lib, instead, is the core change: objects listed in UML_USER_OBJS get completely different CFLAGS. The list always contains, in the arch/um subfolders, all objects whose name matches %_user.o(as it has always been for UML). A strange(not documented) issue I met with GNU make 3.80 is that when I export a recursively expanded variable, what goes to the sub-make is the expanded value, not the "formula definition". Bye and thanks for your attention. -- cat < $@ -$(obj)/config.o : $(obj)/config.c - modules: fastdep: --- ./arch/um/os-Linux/drivers/Makefile.user_obj 2003-04-17 16:11:41.000000000 +0200 +++ ./arch/um/os-Linux/drivers/Makefile 2003-12-23 13:14:37.000000000 +0100 @@ -9,11 +9,3 @@ obj-y = obj-$(CONFIG_UML_NET_ETHERTAP) += ethertap.o obj-$(CONFIG_UML_NET_TUNTAP) += tuntap.o - -USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y)),$($(f)-objs)) - -USER_OBJS = $(filter %_user.o,$(obj-y) $(USER_SINGLE_OBJS)) -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< --- ./arch/um/os-Linux/Makefile.user_obj 2003-04-17 16:11:41.000000000 +0200 +++ ./arch/um/os-Linux/Makefile 2003-12-23 18:16:11.000000000 +0100 @@ -5,10 +5,7 @@ obj-y = file.o process.o tty.o drivers/ -USER_OBJS := $(foreach file,file.o process.o tty.o,$(obj)/$(file)) - -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< +UML_USER_OBJS += file.o process.o tty.o clean : --- ./arch/um/sys-i386/Makefile.user_obj 2003-12-19 18:40:23.000000000 +0100 +++ ./arch/um/sys-i386/Makefile 2003-12-23 13:14:37.000000000 +0100 @@ -4,8 +4,7 @@ obj-$(CONFIG_HIGHMEM) += highmem.o obj-$(CONFIG_MODULES) += module.o -USER_OBJS := bugs.o ptrace_user.o sigcontext.o fault.o -USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file)) +UML_USER_OBJS += bugs.o sigcontext.o fault.o SYMLINKS = semaphore.c highmem.c module.c SYMLINKS := $(foreach f,$(SYMLINKS),$(src)/$f) @@ -21,9 +20,6 @@ ln -sf $(TOPDIR)/arch/i386/$($(notdir $1)-dir)/$(notdir $1) $1 endef -$(USER_OBJS) : %.o: %.c - $(CC) $(CFLAGS_$(notdir $@)) $(USER_CFLAGS) -c -o $@ $< - $(SYMLINKS): $(call make_link,$@) --Boundary-00=_7ae6/aoV5+s4l/l-- ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ User-mode-linux-devel mailing list User-mode-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel