Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] sh4: fix toolchain creation
Date: Sat, 4 Apr 2015 19:44:15 +0200	[thread overview]
Message-ID: <20150404194415.406fe195@free-electrons.com> (raw)
In-Reply-To: <20150320182214.GA3086@waldemar-brodkorb.de>

Dear Waldemar Brodkorb,

On Fri, 20 Mar 2015 19:22:15 +0100, Waldemar Brodkorb wrote:
> The Linux kernel does force compile with -m4-nofpu, which is only
> available when building a multilib toolchain.
> The interesting part here is, that buildroot use --disable-multilib for
> gcc configure, but enables --with-multilib-list=m4,m4-nofpu in
> the default configuration for Qemu targeting r2d emulation.
> This results in a toolchain, which can be used for the kernel and
> for userland without creating a multilib toolchain with different
> kinds of libgcc version. In the multilib case there would be some
> subdirectories created like !m4 or m4-nofpu. As buildroot uses a
> short version of toolchain creation, a multilib enabled gcc build
> fails when creating libgcc.
> 
> So the best solution is to just keep multilib disabled, but always
> add --with-multilib-list=m4,m4-nofpu when sh4/sh4eb is choosen.
> 
> Tested with sh4 minimal toolchain build and qemu defconfig with
> gcc 4.8.x and uClibc.
> 
> To sum up, compiling gcc with disabled multilib, but with a mulitlib-list
> provides a working toolchain which can create sh4 nofpu code without trying to
> create a libgcc for every variant.
> 
> Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>

It still doesn't build here. Maybe it worked for you because you did
not enable C++ support. Here is the defconfig I test:

BR2_sh=y
BR2_TOOLCHAIN_BUILDROOT_INET_IPV6=y
BR2_TOOLCHAIN_BUILDROOT_INET_RPC=y
BR2_TOOLCHAIN_BUILDROOT_LOCALE=y
BR2_TOOLCHAIN_BUILDROOT_CXX=y
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_DEFCONFIG="se7724"

It fails as follows:

(cd /home/test/outputs/sh4/host/usr/bin; for i in sh4-buildroot-linux-uclibc-*; do ln -snf $i sh4-linux${i##sh4-buildroot-linux-uclibc}; done)
cp -dpf /home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/libgcc_s* /home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/sysroot/lib/
cp: cannot stat `/home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/libgcc_s*': No such file or directory
make[1]: [/home/test/outputs/sh4/build/host-gcc-final-4.8.4/.stamp_host_installed] Error 1 (ignored)
cp -dpf /home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/libgcc_s* /home/test/outputs/sh4/target/lib/
cp: cannot stat `/home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/libgcc_s*': No such file or directory
make[1]: [/home/test/outputs/sh4/build/host-gcc-final-4.8.4/.stamp_host_installed] Error 1 (ignored)
mkdir -p /home/test/outputs/sh4/target/usr/lib
for i in  libstdc++ ; do cp -dpf /home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/${i}.a /home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/sysroot/usr/lib/ ; done
cp: cannot stat `/home/test/outputs/sh4/host/usr/sh4-buildroot-linux-uclibc/lib*/libstdc++.a': No such file or directory
make[1]: *** [/home/test/outputs/sh4/build/host-gcc-final-4.8.4/.stamp_host_installed] Error 1
make: *** [_all] Error 2

Also, what about sh4a and sh4aeb ?

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      parent reply	other threads:[~2015-04-04 17:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 18:22 [Buildroot] [PATCH] sh4: fix toolchain creation Waldemar Brodkorb
2015-03-21 15:03 ` Arnout Vandecappelle
2015-03-21 22:52   ` Waldemar Brodkorb
2015-03-21 23:58     ` Arnout Vandecappelle
2015-04-04 17:44 ` Thomas Petazzoni [this message]

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=20150404194415.406fe195@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --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