Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] Sourcery Codebench standard edition
       [not found] <1111022260.18094075.1402928168412.JavaMail.root@openwide.fr>
@ 2014-06-16 15:19 ` Romain Naour
  0 siblings, 0 replies; 2+ messages in thread
From: Romain Naour @ 2014-06-16 15:19 UTC (permalink / raw)
  To: buildroot

Hi all,

Someone has already tried to use Sourcery CodeBench standard edition with Buildroot ?
(I guess not since it don't work as is ;-) )
I'm using buildroot 2013.08, but I think problems remain in the latest version.

I had several issue with the external-toolchain wrapper, since this toolchain need the -msgxx-glibc flag in CFLAGS.

Here is what I have done:
1) Add this new toolchain as external toolchain in ext-tool.mk:
else ifeq ($(BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_X86_201405),y)
#TOOLCHAIN_EXTERNAL_SITE = no public download site
TOOLCHAIN_EXTERNAL_SOURCE = ia32-2014.05-08-i686-pc-linux-gnu-i386-linux.tar.bz2
TOOLCHAIN_EXTERNAL_CFLAGS += -msgxx-glibbc

2) The sysroot directory can't be deducted from "gcc -print-file-name=libc.a" without -msgxx-glibc,
so I added $(TOOLCHAIN_EXTERNAL_CFLAGS) in ext-toolchain-checked and ext-toolchain-installed target.
(file ext-tool.mk)

3) Then, I had a link issue since the specific directory "sgxx-glibc" from toolchain's sysroot wasn't copied to Buildroot's sysroot:
"cannot find crt1.o no such file or directory "
I added a rsync in copy_toolchain_sysroot helper to copy "sgxx-glibc"

4) Now, I can build some target packages but I have links issues with some packages (ncurses, util-linux, can-utils, e2fsprogs)
And, last but not least, I can't build a kernel Linux (It's a pity)

All build fine with the latest (but quite old now) Sourcery CodeBench x86/x86_64 2012.09 toolchain.

Any ideas ?

Best regards,
Romain Naour

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Buildroot] Sourcery Codebench standard edition
@ 2014-06-18 23:22 Romain Naour
  0 siblings, 0 replies; 2+ messages in thread
From: Romain Naour @ 2014-06-18 23:22 UTC (permalink / raw)
  To: buildroot

Hi all,

Le 16/06/2014 17:19, Romain Naour a ?crit :
> Hi all,
> 
> Someone has already tried to use Sourcery CodeBench standard edition with Buildroot ?
> (I guess not since it don't work as is ;-) )
> I'm using buildroot 2013.08, but I think problems remain in the latest version.
> 
> I had several issue with the external-toolchain wrapper, since this toolchain need the -msgxx-glibc flag in CFLAGS.

Ok, I can use the Sourcery Codebench standard but I did some hack in
toolchain-external.mk and helper.mk

The first problem is that the main sysroot can't be found with this toolchain
because "-print-file-name=libc.a" don't work as expected:
$./i686-pc-linux-gnu-gcc -print-file-name=libc.a
libc.a
The path to libc.a is not returned, we have only the file name (which is useless...)
So the toolchain check fail because $PWD/libc.a is used as SYSROOT_DIR

Compared to light version (and all other toolchain):
$./i686-pc-linux-gnu-gcc -print-file-name=libc.a
Full/path/to/i686-pc-linux-gnu/libc/usr/lib/libc.a

Here is what we need to do:
$./i686-pc-linux-gnu-gcc -msgxx-glibc -print-file-name=libc.a
Full/path/to/i686-pc-linux-gnu/libc/sgxx-glibc/usr/lib/libc.a

(The flag "-msgxx-glibc" is given by BR2_TARGET_OPTIMIZATION as config option)

But we have only the "ARCH_SYSROOT_DIR" not the "SYSROOT_DIR"...
To find the main sysroot, I added a test on SYSROOT_DIR (if is a directory) then
I filterout the path to remove the last element.

Then the check "check_glibc" fail because ld-linux*.so.* or ld.so.* are not
found since maxdepth = 2. It is fixed with maxdepth = 3.

Sourcery toolchain support rpc feature but the check_glibc_rpc_feature fail
because it look at the main sysroot.
We need to look at the ARCH_SYSROOT_DIR to find rpc.h
It is fixed by adding a second argument which is used to pass the
ARCH_SYSROOT_DIR to check_glibc_rpc_feature.

I'will send a patch to show all the trick,
Any comments are welcome :)

Best regards,
Romain Naour

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-18 23:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-18 23:22 [Buildroot] Sourcery Codebench standard edition Romain Naour
     [not found] <1111022260.18094075.1402928168412.JavaMail.root@openwide.fr>
2014-06-16 15:19 ` Romain Naour

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox