This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Cygwin and crosstool! (vmlinux.lds.asm problem with 2.6.12.5 case-insensitive build patch from crosstool)



     Hi all,


  I've found a slight problem with the patch from crosstool for compiling on
a case-insensitive filesystem
(http://www.kegel.com/crosstool/crosstool-0.38/patches/linux-2.6.8/linux-2.6
.8-build_on_case_insensitive_fs.patch): it seems it has an unintended
consequence.  I can't explain it too well, but I thought I'd have a go.
This problem did not manifest itself when I used the patch to build 2.6.7,
but it shows up when I try and build 2.6.12.5 with the same technique.

  The problem is that after applying the patch, vmlinux.lds.S ends up being
compiled by the rule for assembling .S files to .o, rather than the rule for
preprocessing .lds files to .lds.s files.  Or at least, that's what seems to
be the case.  The actual symptom I found was that vmlinux.lds.asm ends up
full of #line directives, which makes it no use as a linker script for ld.
When I investigated further, I found that the definition of
CPPFLAGS_vmlinux.lds in arch/arm/Makefile was not being used.  Instead, I
had to define AFLAGS_vmlinux.lds.o.  I also found that I had to export it if
I wanted to define it in the arch/arm/Makefile, although it worked
as-expected if I moved the definition to arch/arm/kernel/Makefile.

  I think that the wrong rule is getting invoked because of the way that the
lds.asm file is an implicit target, but I could be wrong; it's easy to
misinterpret the vast sprawl of spew that emerges from "make -d -p", but
here's a few edited highlights:

----------------------------------<snip!>----------------------------------
# Not a target:
arch/arm/kernel/vmlinux.lds.asm:
#  Implicit rule search has not been done.
#  Modification time never checked.
#  File has not been updated.
----------------------------------<snip!>----------------------------------
__build: arch/arm/kernel/built-in.o arch/arm/kernel/head.o
arch/arm/kernel/init_task.o arch/arm/kernel/vmlinux.lds.asm
#  Phony target (prerequisite of .PHONY).
#  Implicit rule search has not been done.
#  File does not exist.
#  File has not been updated.
#  commands to execute (from `scripts/Makefile.build', line 82):
	@:
----------------------------------<snip!>----------------------------------
  Considering target file `arch/arm/kernel/vmlinux.lds.asm'.
   File `arch/arm/kernel/vmlinux.lds.asm' does not exist.
   Looking for an implicit rule for `arch/arm/kernel/vmlinux.lds.asm'.
   Trying pattern rule with stem `vmlinux.lds.asm'.
   Trying implicit prerequisite `arch/arm/kernel/vmlinux.lds.asm_shipped'.
   Trying pattern rule with stem `vmlinux.lds'.
   Trying implicit prerequisite `arch/arm/kernel/vmlinux.lds.c'.
   Trying pattern rule with stem `vmlinux.lds'.
   Trying implicit prerequisite `arch/arm/kernel/vmlinux.lds.S'.
   Trying rule prerequisite `FORCE'.
   Found an implicit rule for `arch/arm/kernel/vmlinux.lds.asm'.
    Considering target file `arch/arm/kernel/vmlinux.lds.S'.
     Looking for an implicit rule for `arch/arm/kernel/vmlinux.lds.S'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/vmlinux.lds.S_shipped'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/vmlinux.lds.S,v'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/RCS/vmlinux.lds.S,v'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/RCS/vmlinux.lds.S'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/s.vmlinux.lds.S'.
     Trying pattern rule with stem `vmlinux.lds.S'.
     Trying implicit prerequisite `arch/arm/kernel/SCCS/s.vmlinux.lds.S'.
     No implicit rule found for `arch/arm/kernel/vmlinux.lds.S'.
     Finished prerequisites of target file `arch/arm/kernel/vmlinux.lds.S'.
    No need to remake target `arch/arm/kernel/vmlinux.lds.S'.
    Pruning file `FORCE'.
   Finished prerequisites of target file `arch/arm/kernel/vmlinux.lds.asm'.
  Must remake target `arch/arm/kernel/vmlinux.lds.asm'.
scripts/Makefile.build:219: warning: undefined variable `EXTRA_AFLAGS'
scripts/Makefile.build:219: warning: undefined variable
`AFLAGS_vmlinux.lds.o'
scripts/Makefile.build:219: warning: undefined variable
`cmd_arch/arm/kernel/vmlinux.lds.asm'
scripts/Makefile.build:219: warning: undefined variable `silent_cmd_as_s_S'
scripts/Makefile.build:219: warning: undefined variable `EXTRA_AFLAGS'
scripts/Makefile.build:219: warning: undefined variable
`AFLAGS_vmlinux.lds.o'
scripts/Makefile.build:219: warning: undefined variable `EXTRA_AFLAGS'
scripts/Makefile.build:219: warning: undefined variable
`AFLAGS_vmlinux.lds.o'
Putting child 0x00500a50 (arch/arm/kernel/vmlinux.lds.asm) PID 2260 on the
chain.
Live child 0x00500a50 (arch/arm/kernel/vmlinux.lds.asm) PID 2260 
Got a SIGCHLD; 1 unreaped children.
Reaping winning child 0x00500a50 PID 2260 
Removing child 0x00500a50 PID 2260 from chain.
  Successfully remade target file `arch/arm/kernel/vmlinux.lds.asm'.
 Finished prerequisites of target file `__build'.
Must remake target `__build'.
Putting child 0x00500a50 (__build) PID 6024 on the chain.
Live child 0x00500a50 (__build) PID 6024 
Got a SIGCHLD; 1 unreaped children.
Reaping winning child 0x00500a50 PID 6024 
Removing child 0x00500a50 PID 6024 from chain.
Successfully remade target file `__build'.
----------------------------------<snip!>----------------------------------
# Not a target:
arch/arm/kernel/vmlinux.lds.S:
#  Implicit rule search has been done.
#  Last modified 2005-08-18 13:42:47
#  File has been updated.
#  Successfully updated.
----------------------------------<snip!>----------------------------------
# Not a target:
arch/arm/kernel/vmlinux.lds.asm: arch/arm/kernel/vmlinux.lds.S FORCE
#  Implicit rule search has been done.
#  Implicit/static pattern stem: `arch/arm/kernel/vmlinux.lds'
#  Last modified 2005-08-25 12:56:45.6358218
#  File has been updated.
#  Successfully updated.
# automatic
# @ := arch/arm/kernel/vmlinux.lds.asm
# automatic
# % := 
# automatic
# * := arch/arm/kernel/vmlinux.lds
# automatic
# + := arch/arm/kernel/vmlinux.lds.S FORCE
# automatic
# | := 
# automatic
# < := arch/arm/kernel/vmlinux.lds.S
# automatic
# ^ := arch/arm/kernel/vmlinux.lds.S FORCE
# automatic
# ? := arch/arm/kernel/vmlinux.lds.S FORCE
# variable set hash-table stats:
# Load=8/32=25%, Rehash=0, Collisions=26/112=23%
#  commands to execute (from `scripts/Makefile.build', line 219):
	$(call if_changed_dep,as_s_S)
----------------------------------<snip!>----------------------------------
__build: arch/arm/kernel/built-in.o arch/arm/kernel/head.o
arch/arm/kernel/init_task.o arch/arm/kernel/vmlinux.lds.asm
#  Phony target (prerequisite of .PHONY).
#  Implicit rule search has not been done.
#  Implicit/static pattern stem: `'
#  File does not exist.
#  File has been updated.
#  Successfully updated.
# automatic
# @ := __build
# automatic
# % := 
# automatic
# * := 
# automatic
# + := arch/arm/kernel/built-in.o arch/arm/kernel/head.o
arch/arm/kernel/init_task.o arch/arm/kernel/vmlinux.lds.asm
# automatic
# | := 
# automatic
# < := arch/arm/kernel/built-in.o
# automatic
# ^ := arch/arm/kernel/built-in.o arch/arm/kernel/head.o
arch/arm/kernel/init_task.o arch/arm/kernel/vmlinux.lds.asm
# automatic
# ? := arch/arm/kernel/built-in.o arch/arm/kernel/head.o
arch/arm/kernel/init_task.o arch/arm/kernel/vmlinux.lds.asm
# variable set hash-table stats:
# Load=8/32=25%, Rehash=0, Collisions=1/930=0%
#  commands to execute (from `scripts/Makefile.build', line 82):
	@:
----------------------------------<snip!>----------------------------------

  I'm rather new to this kernel-building lark, so I thought I'd throw this
out and see if anyone else has seen this problem / solved it / got a better
idea how to / understands better what the real underlying problem is.


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]