Hi!

I'm doing the port of kbuild 2.5 for the arch/s390 and ach/s390x. I already
have a
working (mostly, it's currently against our internal tree only) patch, but
still have
a few questions/problems:

1. My vmlinux.lds.i depends on a config symbol (CONFIG_SHARED_KERNEL), so I
#included
config.h and used #ifdef in a few places. However, the dependency on the
configuration
does not work unless I give the explicit rule
$(objfile vmlinux.lds.i): $(objfile /include/linux/autoconf.h)
in my Makefile.in. That does not look clean, is there a better way to do
it?

2. There seems to be a bug when changing the target architechture without
changing the
object tree as well. For example:

export KBUILD_OBJTREE=/tmp/kbuildtest
mkdir $KBUILD_OBJTREE
cd $KBUILD_SRCTREE_000
make ARCH=s390 CROSS_COMPILE=$ARCH-linux- oldconfig
make ARCH=s390 CROSS_COMPILE=$ARCH-linux-
 (building correct tree...)
make ARCH=s390x CROSS_COMPILE=$ARCH-linux- oldconfig
make ARCH=s390x CROSS_COMPILE=$ARCH-linux-
 (...)
  phase 3 (evaluate selections)
  phase 4 (write global makefile)
pp_makefile4: Cannot find object for target /arch/s390/asm-offsets.s
pp_makefile4: Cannot find object for target /arch/s390/vmlinux.lds.i

After this, the objtree is completely broken and I am unable to build
anything
for either architecture any more until I do 'rm -rf $KBUILD_OBJTREE'. Even
'make clean' is not enough. The arch specific files simply seem to add up
e.g. after an
attempted build for s390x and i386, building for s390 will already miss
four files
(arch/i386/boot/compressed/piggy.o, /arch/s390x/vmlinux.lds.i,
/arch/i386/vmlinux.lds.i
and /arch/s390x/asm-offsets.s).

3. In /drivers/s390, all object files are selected only when $(ARCH)=s390
is set. However,
they should also be selected for $(ARCH)=s390x. In my patch, I have
replaced the ifeq(ARCH)
with conditionals on CONFIG_ARCH_S390, which is defined for both s390 and
s390x and this
works fine. Is this the preferred way to do it in this case or should I
rather use some
more complex conditional to test for either arch?




_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to