Re: asm-offsets.h is generated in the source tree

From: Al Viro
Date: Sat Sep 10 2005 - 21:35:10 EST


On Sat, Sep 10, 2005 at 06:19:17PM +0200, Sam Ravnborg wrote:
> On Sun, Sep 11, 2005 at 01:20:33AM +1000, Stephen Rothwell wrote:
> > The latest Linus-git tree generates asm-offsets.h in the source tree even
> > if you use O=... I don't know how to fix this, but it means that the
> > source tree cannot be read only.
> My bad. I checked it compiled, not where it saved the file.
> I will have a fix tonight.

BTW, early build stages on uml with O= are still broken, even with that
patch. The following fixes them, but first chunk is a bad kludge.

What happens:
a) silentconfig expects to have include/linux in build tree already
created. Normally that happens earlier, but only by accident. We need to
force that somehow and the way I'd done it is almost certainly wrong - it
should be in top-level makefile, to start with. Suggestions?
b) kernel-offsets.h needs symlinks already in place. prepare1 does
everything we need, so that dependency is probably the right thing (the second
chunk).

diff -urN RC13-git10-base/arch/um/Makefile current/arch/um/Makefile
--- RC13-git10-base/arch/um/Makefile 2005-09-10 19:28:53.000000000 -0400
+++ current/arch/um/Makefile 2005-09-10 18:34:51.000000000 -0400
@@ -213,6 +213,8 @@
echo "#endif" )
endef

+include/linux/autoconf.h : include/linux/version.h
+
$(ARCH_DIR)/include/uml-config.h : include/linux/autoconf.h
$(call filechk,umlconfig)

@@ -227,9 +229,8 @@
$(ARCH_DIR)/kernel-offsets.s: $(ARCH_DIR)/sys-$(SUBARCH)/kernel-offsets.c \
$(ARCH_SYMLINKS) \
$(SYS_DIR)/sc.h \
- include/asm include/linux/version.h \
- include/config/MARKER \
- $(ARCH_DIR)/include/user_constants.h
+ $(ARCH_DIR)/include/user_constants.h \
+ prepare1
$(CC) $(CFLAGS) $(NOSTDINC_FLAGS) $(CPPFLAGS) -S -o $@ $<

$(ARCH_DIR)/kernel-offsets.h: $(ARCH_DIR)/kernel-offsets.s
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/