Message ID | 20090420024954.GW26366@ZenIV.linux.org.uk (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Apr 20, 2009 at 06:45:51AM +0200, Sam Ravnborg wrote: > For kernel proper the use of -idirafter would be confusing. > But for um alone we should be safe provided it is properly commented. Less than for all um - it's only for USER_OBJ there. It is special, simply because for uml the counterpart of really low-level glue has to talk to libc. So there we have separation into "normal kernel source" and "userland code that uses userland headers, calls libc functions, etc." > I have already fixed um the obvious way for asm-offsets in my local tree. > But if you prefer I can add a -dirafter based patch before the "move > asm-offsets.h to incldue/generated" patch. I've dumped several header cleanup patches for uml into git://git.kernel.org/pub/scm/linux/kernel/git/viro/um-header.git/ including the -idirafter, move of user_constants.h, etc. Another fun thing: user.h used to be included directly by just about every userland-side file. Switched it to -include user.h (for USER_CFLAGS, of course - not for normal stuff), killed includes, got rid of shitloads of kern_constants.h includes at the same time. At which point getting rid of kern_constants.h became trivial. Up to Jeff's approval, obviously - *including* -idirafter patch. -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/um/Makefile b/arch/um/Makefile index 0728def..dce2d7f 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -47,7 +47,7 @@ KBUILD_AFLAGS += $(ARCH_INCLUDE) USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -D__KERNEL__,,\ $(patsubst -I%,,$(KBUILD_CFLAGS)))) $(ARCH_INCLUDE) $(MODE_INCLUDE) \ - $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 + $(filter -I%,$(CFLAGS)) -D_FILE_OFFSET_BITS=64 -idirafter include include $(srctree)/$(ARCH_DIR)/Makefile-$(SUBARCH) @@ -150,6 +150,6 @@ $(SHARED_HEADERS)/user_constants.h: $(ARCH_DIR)/sys-$(SUBARCH)/user-offsets.s $(SHARED_HEADERS)/kern_constants.h: $(Q)mkdir -p $(dir $@) - $(Q)echo '#include "../../../../include/asm/asm-offsets.h"' >$@ + $(Q)echo '#include <asm/asm-offsets.h>' >$@ export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS HEADER_ARCH DEV_NULL_PATH