Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla at busybox.net <bugzilla@busybox.net>
To: buildroot@busybox.net
Subject: [Buildroot] [Bug 695] New: Build using reconfigured external toolchain fails
Date: Fri,  6 Nov 2009 18:40:47 +0000 (UTC)	[thread overview]
Message-ID: <bug-695-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=695

              Host: x86
            Target: arm926t
           Summary: Build using reconfigured external toolchain fails
           Product: buildroot
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: major
          Priority: P5
         Component: Other
        AssignedTo: unassigned at buildroot.uclibc.org
        ReportedBy: maksim.rayskiy at conexant.com
                CC: buildroot at uclibc.org
   Estimated Hours: 0.0


When building using external binary toolchain make verifies configuration and
supported options through a set of checks in
toolchain/external-toolchain/ext-tool.mk. The file uses
SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " "
"\n" | grep -- "--with-sysroot" | cut -f2 -d=)
to determine sysroot folder.

Normally, <cross>-gcc -v would report something like

Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with: /home/developer/jackal/toolchain_build_arm/gcc-4.4.1/configure
--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibcgnueabi --enable-languages=c,c++
--with-sysroot=/home/developer/jackal/build_arm/staging_dir
--with-build-time-tools=/home/developer/jackal/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libssp
--disable-tls --enable-shared
--with-gmp=/home/developer/jackal/toolchain_build_arm/gmp
--with-mpfr=/home/developer/jackal/toolchain_build_arm/mpfr --disable-nls
--enable-threads --disable-multilib --disable-decimal-float
--with-abi=aapcs-linux --with-arch=armv5te --with-tune=arm9tdmi 
Thread model: posix
gcc version 4.4.1 (GCC)

and macro properly extracts sysroot folder value. In my case, 
SYSROOT_DIR=/home/developer/jackal/build_arm/staging_dir

However, if the toolchain was reconfigured after initial build, gcc report is
different

Using built-in specs.
Target: arm-linux-uclibcgnueabi
Configured with: /home/developer/jackal/toolchain_build_arm/gcc-4.4.1/configure
--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibcgnueabi --enable-languages=c,c++
--with-sysroot=/home/developer/jackal/build_arm/staging_dir
--with-build-time-tools=/home/developer/jackal/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libssp
--disable-tls --enable-shared
--with-gmp=/home/developer/jackal/toolchain_build_arm/gmp
--with-mpfr=/home/developer/jackal/toolchain_build_arm/mpfr --disable-nls
--enable-threads --disable-multilib --disable-decimal-float
--with-abi=aapcs-linux --with-arch=armv5te --with-tune=arm9tdmi :
(reconfigured) /home/developer/jackal/toolchain_build_arm/gcc-4.4.1/configure
--prefix=/usr --build=i386-pc-linux-gnu --host=i386-pc-linux-gnu
--target=arm-linux-uclibcgnueabi --enable-languages=c,c++
--with-sysroot=/home/developer/jackal/build_arm/staging_dir
--with-build-time-tools=/home/developer/jackal/build_arm/staging_dir/usr/arm-linux-uclibcgnueabi/bin
--disable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-libssp
--disable-tls --enable-shared
--with-gmp=/home/developer/jackal/toolchain_build_arm/gmp
--with-mpfr=/home/developer/jackal/toolchain_build_arm/mpfr --disable-nls
--enable-threads --disable-multilib --disable-decimal-float
--with-abi=aapcs-linux --with-arch=armv5te --with-tune=arm9tdmi
Thread model: posix
gcc version 4.4.1 (GCC)

In such case, 
SYSROOT_DIR=/home/developer/jackal/build_arm/staging_dir
/home/developer/jackal/build_arm/staging_dir
and make fails immediately after that.

I would suggest modifying SYSROOT_DIR definition to extract only the latest
sysroot option:

SYSROOT_DIR=$(shell LANG=C $(TARGET_CC) -v 2>&1 | grep ^Configured | tr " "
"\n" | grep -- "--with-sysroot" | tail -n 1 | cut -f2 -d=)


-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

             reply	other threads:[~2009-11-06 18:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-06 18:40 bugzilla at busybox.net [this message]
2010-02-21 18:13 ` [Buildroot] [Bug 695] Build using reconfigured external toolchain fails bugzilla at busybox.net

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=bug-695-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@busybox.net \
    /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