public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Scott Wood <scottwood@freescale.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v2] makefiles: fixes for building build tools
Date: Thu, 03 Dec 2009 13:09:45 -0600	[thread overview]
Message-ID: <4B180CF9.4030401@freescale.com> (raw)
In-Reply-To: <200912031917.06900.sr@denx.de>

Stefan Roese wrote:
> On Thursday 03 December 2009 18:49:26 Scott Wood wrote:
>> Git bisect says:
>> 4649913ea5f440d756d150a6fdf2fb2e8ecb75fd is the first bad commit
>> commit 4649913ea5f440d756d150a6fdf2fb2e8ecb75fd
>> Author: Stefan Roese <sr@denx.de>
>> Date:   Tue Oct 27 16:11:26 2009 +0100
>>
>>      ppc4xx: Add common ppc4xx linker script
>>
>>      This linker script can be used by all PPC4xx platforms. It works for
>>      PPC405 and PPC440 platforms. Boards which need a board specific linker
>>      script can override this default linker script in board/*/config.mk.
>>
>>      Signed-off-by: Stefan Roese <sr@denx.de>
> 
> Hmmm. I don't see this here. Do you only see this for katmai, or for other
> 4xx targets as well? kilauea, sequoia?

Looks like all of them.

> make[1]: Entering directory `/home/stefan/git/u-boot/u-boot/tools'                
> powerpc-linux-gcc  -g  -Os   -mrelocatable -fPIC -ffixed-r14 -meabi -D__KERNEL__ -
> DTEXT_BASE=0xFFFA0000 -I/home/stefan/git/u-boot/u-boot/include -fno-builtin -
> ffreestanding -nostdinc -isystem /opt/eldk-4.2/usr/bin/../lib/gcc/powerpc-
> linux/4.2.2/include -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -mstring -
> msoft-float -Wa,-m405 -mcpu=405 -Wall -Wstrict-prototypes -fno-stack-protector   -o 
> crc32.o crc32.c -c
> powerpc-linux-gcc  -g  -Os   -mrelocatable -fPIC -ffixed-r14 -meabi -D__KERNEL__ -
> DTEXT_BASE=0xFFFA0000 -I/home/stefan/git/u-boot/u-boot/include -fno-builtin -
> ffreestanding -nostdinc -isystem /opt/eldk-4.2/usr/bin/../lib/gcc/powerpc-
> linux/4.2.2/include -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -mstring -
> msoft-float -Wa,-m405 -mcpu=405 -Wall -Wstrict-prototypes -fno-stack-protector   -o 
> env_embedded.o env_embedded.c -c
> gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/stefan/git/u-
> boot/u-boot/include -idirafter /home/stefan/git/u-boot/u-boot/include2 -idirafter 
> /home/stefan/git/u-boot/u-boot/include -I /home/stefan/git/u-boot/u-boot/libfdt -I 
> /home/stefan/git/u-boot/u-boot/tools -DTEXT_BASE=0xFFFA0000 -DUSE_HOSTCC -
> D__KERNEL_STRICT_NAMES -pedantic   -o envcrc.o envcrc.c -c
> powerpc-linux-gcc  -g  -Os   -mrelocatable -fPIC -ffixed-r14 -meabi -D__KERNEL__ -
> DTEXT_BASE=0xFFFA0000 -I/home/stefan/git/u-boot/u-boot/include -fno-builtin -
> ffreestanding -nostdinc -isystem /opt/eldk-4.2/usr/bin/../lib/gcc/powerpc-
> linux/4.2.2/include -pipe  -DCONFIG_PPC -D__powerpc__ -DCONFIG_4xx -ffixed-r2 -mstring -
> msoft-float -Wa,-m405 -mcpu=405 -Wall -Wstrict-prototypes -fno-stack-protector   -o 
> sha1.o sha1.c -c
> gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -idirafter /home/stefan/git/u-
> boot/u-boot/include -idirafter /home/stefan/git/u-boot/u-boot/include2 -idirafter 
> /home/stefan/git/u-boot/u-boot/include -I /home/stefan/git/u-boot/u-boot/libfdt -I 
> /home/stefan/git/u-boot/u-boot/tools -DTEXT_BASE=0xFFFA0000 -DUSE_HOSTCC -
> D__KERNEL_STRICT_NAMES -pedantic  -o envcrc crc32.o env_embedded.o envcrc.o sha1.o
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> /usr/bin/ld: crc32.o: Relocations in generic ELF (EM: 20)
> crc32.o: could not read symbols: File in wrong format
> collect2: ld returned 1 exit status
> make[1]: *** [envcrc] Error 1
> make[1]: Leaving directory `/home/stefan/git/u-boot/u-boot/tools'
> make: *** [tools] Error 2
> [stefan at stefan-desktop u-boot (next)]$ file tools/crc32.o
> tools/crc32.o: ELF 32-bit MSB relocatable, PowerPC or cisco 4500, version 1 (SYSV), not 
> stripped
> 
> So the complete tools directory is compiled for powerpc!

Actually, it looks like it's just the files whose sources live somewhere else 
(look at envcrc.c, for example).  Those files should be hitting these rules 
inside tools/Makefile:

# Some of the tool objects need to be accessed from outside the tools directory
$(obj)%.o: $(SRCTREE)/common/%.c
         $(HOSTCC) -g $(HOSTCFLAGS_NOPED) -c -o $@ $<

$(obj)%.o: $(SRCTREE)/lib_generic/%.c
         $(HOSTCC) -g $(HOSTCFLAGS) -c -o $@ $<

Do you by any chance have a copy of/link to crc32.c, env_embedded.c, etc. 
sitting in your tools directory, allowing it to match the normal pattern rule?

-Scott

  reply	other threads:[~2009-12-03 19:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05  0:41 [U-Boot] [PATCH v2] makefiles: fixes for building build tools Scott Wood
2009-11-13 18:51 ` Mike Frysinger
2009-11-13 18:53   ` Scott Wood
2009-11-13 23:07     ` Mike Frysinger
2009-12-02 21:59 ` Wolfgang Denk
2009-12-03  7:26   ` Stefan Roese
2009-12-03 17:49     ` Scott Wood
2009-12-03 18:17       ` Stefan Roese
2009-12-03 19:09         ` Scott Wood [this message]
2009-12-04  3:45           ` Stefan Roese

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B180CF9.4030401@freescale.com \
    --to=scottwood@freescale.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox