Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Raspberry Pi and Crossdev GCC 4.7.2
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures
View previous topic :: View next topic  
Author Message
antonlacon
Apprentice
Apprentice


Joined: 27 Jun 2004
Posts: 257

PostPosted: Sun Mar 24, 2013 10:50 am    Post subject: Raspberry Pi and Crossdev GCC 4.7.2 Reply with quote

I'm building gcc-4.7.2 in a crossdev environment for a Raspberry Pi. I've noticed that part of the package's lib files are installed into usr/lib/gcc/armv6j-hardfloat-linux/4.7.1 instead of 4.7.2

Excerpt of the install portion:
Code:
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.2/libitm.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.2/libstdc++.so.6.0.17
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.2/libstdc++.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.2/libgfortran.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/libgcc_eh.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/libgcc.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/libgcov.a
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/crtbegin.o
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/crtbeginS.o
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/crtbeginT.o
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/crtend.o
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/crtendS.o
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/include/
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/include/unwind.h
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/armv6j-hardfloat-linux-gnueabi-c++
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/armv6j-hardfloat-linux-gnueabi-gcc-ar
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/armv6j-hardfloat-linux-gnueabi-gcc-nm
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/armv6j-hardfloat-linux-gnueabi-gcc-ranlib
>>> /usr/armv6j-hardfloat-linux-gnueabi/usr/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.2/c++ -> armv6j-hardfloat-linux-gnueabi-c++


Needless to say, the Pi is upset at not finding those libs installed into 4.7.1.

Looking at the cross-compiler, the x86-64 -> arm toolchain is building gcc 4.7.1 even though 4.7.2 is specified:

Code:
crossdev -S --g 4.7.2 -t armv6j-hardfloat-linux-gnueabi
-------------------------------------------------------------------------------------------------------------------------------------
 * crossdev version:      20120721
 * Host Portage ARCH:     amd64
 * Target Portage ARCH:   arm
 * Target System:         armv6j-hardfloat-linux-gnueabi
 * Stage:                 4 (C/C++ compiler)
 * ABIs:                  default

 * binutils:              binutils-[stable]
 * gcc:                   gcc-4.7.2
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * CROSSDEV_OVERLAY:      /usr/local/portage
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:   
 * Portage flags:         


x86-64 -> arm gcc:
Code:
armv6j-hardfloat-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.1/armv6j-hardfloat-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/lto-wrapper
Target: armv6j-hardfloat-linux-gnueabi
Configured with: /var/tmp/portage/cross-armv6j-hardfloat-linux-gnueabi/gcc-4.7.1/work/gcc-4.7.1/configure --prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/armv6j-hardfloat-linux-gnueabi/gcc-bin/4.7.1 --includedir=/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/include --datadir=/usr/share/gcc-data/armv6j-hardfloat-linux-gnueabi/4.7.1 --mandir=/usr/share/gcc-data/armv6j-hardfloat-linux-gnueabi/4.7.1/man --infodir=/usr/share/gcc-data/armv6j-hardfloat-linux-gnueabi/4.7.1/info --with-gxx-include-dir=/usr/lib/gcc/armv6j-hardfloat-linux-gnueabi/4.7.1/include/g++-v4 --host=x86_64-pc-linux-gnu --target=armv6j-hardfloat-linux-gnueabi --build=x86_64-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --without-cloog --enable-lto --with-float=hard --enable-nls --without-included-gettext --with-system-zlib --enable-obsolete --disable-werror --enable-secureplt --disable-multilib --disable-libmudflap --disable-libssp --enable-libgomp --with-python-dir=/share/gcc-data/armv6j-hardfloat-linux-gnueabi/4.7.1/python --enable-poison-system-directories --enable-checking=release --disable-libgcj --enable-libstdcxx-time --with-arch=armv6j --with-float=hard --with-fpu=vfp --enable-languages=c,c++,fortran --with-sysroot=/usr/armv6j-hardfloat-linux-gnueabi --disable-bootstrap --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.7.1 p1.5, pie-0.5.3'
Thread model: posix
gcc version 4.7.1 (Gentoo 4.7.1 p1.5, pie-0.5.3)


Am I missing something? Did I find a bug? Would the bug be in gcc or crossdev?
Back to top
View user's profile Send private message
antonlacon
Apprentice
Apprentice


Joined: 27 Jun 2004
Posts: 257

PostPosted: Sun Mar 24, 2013 11:04 am    Post subject: Reply with quote

To answer part of this, crossdev needed the revision specified when setting up the cross-compiler, ie: --g 4.7.2-r1, in order to grab 4.7.2.
Back to top
View user's profile Send private message
antonlacon
Apprentice
Apprentice


Joined: 27 Jun 2004
Posts: 257

PostPosted: Sun Mar 24, 2013 11:23 am    Post subject: Reply with quote

Resolving the above cross-compile --g issue solved the rest of my issues. The Pi is happily compiling again.

Leaving this thread in case this bites someone else.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on Alternative Architectures All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum