From mboxrd@z Thu Jan 1 00:00:00 1970 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 1AWfmV-0002kl-19 for user-mode-linux-devel@lists.sourceforge.net; Wed, 17 Dec 2003 09:48:19 -0800 Received: from smtp004.mail.ukl.yahoo.com ([217.12.11.35]) by sc8-sf-mx1.sourceforge.net with smtp (Exim 4.24) id 1AWfmU-0003vb-6s for user-mode-linux-devel@lists.sourceforge.net; Wed, 17 Dec 2003 09:48:18 -0800 From: BlaisorBlade Subject: Re: [uml-devel] Re: [PATCH]Modules support in 2.6: reaching the complete fix References: <200312131828.03645.blaisorblade_spam@yahoo.it> <200312132019.hBDKJ8rL002905@ccure.user-mode-linux.org> In-Reply-To: <200312132019.hBDKJ8rL002905@ccure.user-mode-linux.org> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_WeJ4/W97nZxLduU" Message-Id: <200312171851.18353.blaisorblade_spam@yahoo.it> 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, 17 Dec 2003 18:51:18 +0100 To: user-mode-linux-devel@lists.sourceforge.net --Boundary-00=_WeJ4/W97nZxLduU Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Alle 21:19, sabato 13 dicembre 2003, Jeff Dike ha scritto: > > 2) then, the UML build system is broken for USER_OBJS. > > This is separate from the module problem. It still needs fixing though. > > > Instead of specifying the rule each time, wouldn't it be good > > something such(in pseudo-code, I know there is only foreach in > > make-language)? > > > > for i in USER_OBJS; do > > CFLAGS_$i+=USER_CFLAGS done > > It would be nice just to have something in one Makefile, like > arch/um/Makefile, which makes this work. I haven't looked at whether this > is possible. Aargh! I discovered how to write the above loop. BUT the problem is that setting CFLAGS_$i is not what we need, since that flags are added to kernel ones, while the kernel flags must be deleted. So we must not do this, but instead add another rule to the main Makefiles, or something else patch them. Do you need a different output(i.e. USERCC) for the USER_OBJS or it is not needed? If not, I can just patch this way scripts/Makefile.lib: c_flags = $(if $(find $(@F),$(user-objs)), UML_user_c_flags, norm_c_flags) #def. of norm_c_flags #def. of UML_user_c_flags In fact, the flags passed to the compiler are $(c_flags), which contain CFLAGS, EXTRA_CFLAGS, CFLAGS_$@ and the special, fixed kernel flags. So this instead is put inside norm_c_flags; Also, this can be moved to the main Makefile once for all (note these are deferred assignments): USER_SINGLE_OBJS = $(foreach f,$(patsubst %.o,%,$(obj-y) \ $(obj-m)),$($(f)-objs)) user-objs = $(filter %_user.o,$(obj-y) $(obj-m) $(USER_SINGLE_OBJS)) # You can put: # user-objs += whatever.o # in each sub-Makefile. I'm posting the "structure" patch for this(a bit different for various little details). If you agree with this, I'll go patching each needed Makefile. Bye -- cat <