Michael Scherer writes:
> 1) make output:
>
> CHK include/linux/version.h
> CHK include/generated/utsrelease.h
> CALL scripts/checksyscalls.sh
> CHK include/generated/compile.h
> LD init/mounts.o
> ls -Al -m elf_x86_64 -r -o init/mounts.o init/do_mounts.o
> init/do_mounts_initrd.o init/mounts.o: No such file or directory
> make[1]: *** [init/mounts.o] Error 1
> make: *** [init] Error 2
>
> There is an LD, the ls line is part of the error message.
But the options look really more like ld options to me. How this could
possibly happen, I don't know. Some overriding of $(LD) perhaps? Does
"env | egrep -i 'ls|ld'" show something weird? Does it also fail as a
non-root user, after you copied the stuff over to somewhere where this
user can write? Just grasping at straws here.
> But without doubt you are right that mounts.o is not built, for
> whatever reason.
Because ld should build it from init/do_mounts.o, but ls is being called
instead?
> The build command
>
> init/.do_mounts.o.cmd:cmd_init/do_mounts.o := gcc
> -Wp,-MD,init/.do_mounts.o.d -nostdinc
> -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.3/include
> -I/usr/src/linux-3.2.12-gentoo/arch/x86/include
> -Iarch/x86/include/generated -Iinclude
> -include /usr/src/linux-3.2.12-gentoo/include/linux/kconfig.h
> -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
> -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
> -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -march=k8
> -mno-red-zone -mcmodel=kernel -funit-at-a-time
> -maccumulate-outgoing-args -fstack-protector -DCONFIG_AS_CFI=1
> -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1
> -DCONFIG_AS_FXSAVEQ=1 -pipe -Wno-sign-compare
> -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
> -Wframe-larger-than=2048 -fno-omit-frame-pointer
> -fno-optimize-sibling-calls -fno-inline-functions-called-once
> -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow
> -fconserve-stack -DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=\#s"
> -D"KBUILD_BASENAME=KBUILD_STR(do_mounts)"
> -D"KBUILD_MODNAME=KBUILD_STR(mounts)" -c -o init/do_mounts.o
> init/do_mounts.c
>
> contains a directive to build mounts.o, see second last line, but
> it for some reason this is ignored.
> Maybe there is a flaw in that command, only I can't find it.
Neither can I. Is this command executed at all? If you maybe replace the
'gcc' by 'gccXXX', does this give an error? Or put an 'echo' in
front of the gcc'.
You can try 'make -d', this will give you LOTS of debug output, but I
don't think you will see the actual commands then.
Wonko