On Monday 14 February 2005 00:11, Vadim Abrossimov wrote:
> On Sun, 13 Feb 2005 16:50:59 -0500, Jeff Dike <[EMAIL PROTECTED]> wrote:

> This is the patch for USER_OBJS:
Ok, I have two more requests, if possible:
1) add something like arch/um/Rules.make which is included everywhere needed 
and contains boilerplate, repeated code. Ideally that would also contain also 
these two lines:

USER_OBJS += $(filter %_user.o,$(obj-y))
USER_OBJS := $(foreach file,$(USER_OBJS),$(obj)/$(file))

which are common to everything. So, most changes to this stuff could be 
insulated.

2) There is an error in the patch (even in Al's idea): you must swap, in the 
below code, CFLAGS_$(notdir $@) and $(USER_CFLAGS), since the former must be 
able to override the latter.

At least arch/um/kernel/frame.o will miscompile with the current patch; from 
arch/um/kernel/Makefile

#This must override the default -fomit-frame-pointer
CFLAGS_frame.o := -fno-omit-frame-pointer

#Notice that this declaration is correct.
$(USER_OBJS) : %.o: %.c
        $(CC) $(USER_CFLAGS) $(CFLAGS_$(notdir $@)) -c -o $@ $<

And yes, this is a reason to use a common include instead of duplicating 
everything.
> +$(USER_OBJS) : c_flags = -Wp,-MD,$(depfile) $(CFLAGS_$(notdir $@))
> $(USER_CFLAGS)

-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729
http://www.user-mode-linux.org/~blaisorblade




-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
User-mode-linux-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to