Discussion:
ABE - bug in copy_gcc_libs_to_sysroot() while building native toolchain for aarch64
Virendra Kumar Pathak
2015-07-27 06:36:26 UTC
Permalink
Hi Linaro Toolchain Group,

I am building a native toolchain for aarch64 with below configurations:
--build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
--target=aarch64-linux-gnu.

In copy_gcc_libs_to_sysroot() - which copy libgcc.a to sysroot, current
implementation try to find the absolute path of libgcc.a as below :
libgcc="`${local_builds}/destdir/${host}/bin/${target}-gcc
-print-file-name=${libgcc}`

But above line will not execute (i.e. gcc -print-file-name) on x86_64 as
the toolchain is native toolchain for aarch64-linux-gnu. Thus a infinite
loop will be created in copy command i.e. copying directory x in x.

however, when I hard coded the libgcc.a path in my machine (as below),
everything went fine.
libgcc="/home/vpathak/arm/toolchain/build_abe_new/builds/destdir/aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/5.1.1/libgcc.a"

I think this is a bug in ABE build infrastructure.

Thanks.
--
with regards,
Virendra Kumar Pathak
Jim Wilson
2015-07-27 15:41:01 UTC
Permalink
On Sun, Jul 26, 2015 at 11:36 PM, Virendra Kumar Pathak
Post by Virendra Kumar Pathak
In copy_gcc_libs_to_sysroot() - which copy libgcc.a to sysroot, current
libgcc="`${local_builds}/destdir/${host}/bin/${target}-gcc
-print-file-name=${libgcc}`
The easy solution is to change ${host} to ${build}, here and immediately above.

Jim
Ryan Arnold
2015-07-27 16:05:00 UTC
Permalink
Post by Jim Wilson
On Sun, Jul 26, 2015 at 11:36 PM, Virendra Kumar Pathak
Post by Virendra Kumar Pathak
In copy_gcc_libs_to_sysroot() - which copy libgcc.a to sysroot, current
libgcc="`${local_builds}/destdir/${host}/bin/${target}-gcc
-print-file-name=${libgcc}`
The easy solution is to change ${host} to ${build}, here and immediately above.
I've been looking for the source of this bug for ages. Thanks Virendra and
Jim! I'll take a look.
--
Ryan S. Arnold
Linaro Toolchain Working Group - Engineering Manager
www.linaro.org
Loading...