All of lore.kernel.org
 help / color / mirror / Atom feed
From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] errno confusion for fw_env?
Date: Mon, 08 Nov 2010 19:33:06 +0100	[thread overview]
Message-ID: <m2d3qfd5st.fsf@ohwell.denx.de> (raw)

Hi,

with current master I tried to cross-compile a fw_env tool for the
da850evm configuration.  So I tried the "standard scheme" (means it worked a
few years ago)

make distclean
make da850evm_config
make env

Doing this I noticed that commit
abd315a1357ab05e82f0d61ebad666bc0d5378c3 disabled cross-compilation.  So
I reverted the commit locally on my tree to enable cross-compilation
again, but now I get:

  [dzu at pollux u-boot-testing (master)]$ make env
  make -C tools/env all MTD_VERSION=
  make[1]: Entering directory `/work/dzu/git/u-boot-testing/tools/env'
  arm-linux-gcc -Wall -DUSE_HOSTCC -I/work/dzu/git/u-boot-testing/include crc32.c  fw_env.c  fw_env_main.c -o fw_printenv
  /opt/eldk-4.2-2008-11-24/usr/bin/../lib/gcc/arm-linux-gnueabi/4.2.2/../../../../arm-linux-gnueabi/bin/ld: errno: TLS definition in /opt/eldk-4.2-2008-11-24/usr/../arm/lib/libc.so.6 section .tbss mismatches non-TLS reference in /tmp/cc45c402.o
  /opt/eldk-4.2-2008-11-24/usr/../arm/lib/libc.so.6: could not read symbols: Bad value
  collect2: ld returned 1 exit status
  make[1]: *** [fw_printenv] Error 1
  make[1]: Leaving directory `/work/dzu/git/u-boot-testing/tools/env'
  make: *** [env] Error 2

The cross-compilation and the "-DUSE_HOSTCC" doesn't look right
somehow.  And moreover we now pull in the "U-Boot errno" stuff for a
regular user-space tool through "-I$(SRCTREE)/include".

The latter comes from this commit:

commit f3b6d528e4dd719640a4bfcd954f4e4c7f5db0d6
Author: Grant Erickson <gerickson@nuovations.com>
Date:   Tue May 6 16:18:00 2008 -0700

    Fix Compilation Errors with 'tools/env/fw_printenv'
    
    In the current top-of-tree, 1.3.3.-rc2, the optional tool
    'tools/env/fw_printenv' fails to compile for two reasons:
    
    1) The header watchdog.h cannot be found.
    2) The header zlib.h is picked up from the tool chain rather than the
       project causing a prototype conflict for crc32.
    
    This patch addresses both of these issues.
    
    Platforms Tested On:
    - AMCC "Kilauea"
    
    Signed-off-by: Grant Erickson <gerickson@nuovations.com>

It was probably not anticipated that this now picks up errno.h from the
project as well.

Does anybody have a good idea on how to tackle this?

Thanks
  Detlev

-- 
These days, even the most pure and abstract mathematics is in danger
to be applied.
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de

             reply	other threads:[~2010-11-08 18:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-08 18:33 Detlev Zundel [this message]
2011-03-10 15:36 ` [U-Boot] errno confusion for fw_env? Robert McCullough
  -- strict thread matches above, loose matches on Subject: below --
2011-03-10 15:43 Robert McCullough

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=m2d3qfd5st.fsf@ohwell.denx.de \
    --to=dzu@denx.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.