Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 207284 - gcc-3.2.3 cross-compiling outputs are ruined by strip-ing for all targets on amd64
Summary: gcc-3.2.3 cross-compiling outputs are ruined by strip-ing for all targets on ...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: AMD64 Linux
: High major
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-24 13:42 UTC by Ákos Maróy
Modified: 2008-11-07 09:46 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ákos Maróy 2008-01-24 13:42:51 UTC
when building a crossdev toolchain by invoking the crossdev tool, all libraries are ruined by the x86_64-pc-linux-gnu-strip command, when emerge strips the libraries.

during emerge, one gets output like:

strip: x86_64-pc-linux-gnu-strip --strip-unneeded -R .comment
   usr/lib/gcc-lib/msp430/3.2.3/cc1
   usr/lib/gcc-lib/msp430/3.2.3/cpp0
   usr/lib/gcc-lib/msp430/3.2.3/collect2
   usr/lib/gcc-lib/msp430/3.2.3/cc1plus
   usr/lib/gcc-lib/msp430/3.2.3/tradcpp0
   usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(_cmpsf2.o)'
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(__stop_progExec__.o)'
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(_mulqi3.o)'
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(_mulhi3.o)'
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(_mulsi3.o)'
x86_64-pc-linux-gnu-strip: Unable to recognise the format of the input
file
`/var/tmp/portage/cross-msp430/mspgcc-3.2.3/image/usr/lib/gcc-lib/msp430/3.2.3/msp1/libgcc.a(_mulsi3hw.o)'


the result is that nothing will compile, as system packages are corrupted:

$ make
avr-g++ -c -mmcu=atmega8 -I. -DF_CPU=16000000 -I/home/maroy/src/tyrell/src/arduino/usr/arduino -Os /home/maroy/src/tyrell/src/arduino/usr/arduino/HardwareSerial.cpp -o /home/maroy/src/tyrell/src/arduino/usr/arduino/HardwareSerial.o 
avr-g++ -c -mmcu=atmega8 -I. -DF_CPU=16000000 -I/home/maroy/src/tyrell/src/arduino/usr/arduino -Os /home/maroy/src/tyrell/src/arduino/usr/arduino/WRandom.cpp -o /home/maroy/src/tyrell/src/arduino/usr/arduino/WRandom.o 
avr-gcc -mmcu=atmega8 -I. -gstabs -DF_CPU=16000000 -I/home/maroy/src/tyrell/src/arduino/usr/arduino -Os -Wall -Wstrict-prototypes -std=gnu99  /home/maroy/src/tyrell/src/arduino/usr/arduino/pins_arduino.o /home/maroy/src/tyrell/src/arduino/usr/arduino/wiring.o /home/maroy/src/tyrell/src/arduino/usr/arduino/WInterrupts.o blink.o /home/maroy/src/tyrell/src/arduino/usr/arduino/HardwareSerial.o /home/maroy/src/tyrell/src/arduino/usr/arduino/WRandom.o  --output blink.elf 
/usr/libexec/gcc/avr/ld: skipping incompatible /usr/lib/gcc/avr/4.2.2/avr4/libgcc.a when searching for -lgcc
/usr/libexec/gcc/avr/ld: skipping incompatible /usr/lib/gcc/avr/4.2.2/avr4/libgcc.a when searching for -lgcc
/usr/libexec/gcc/avr/ld: skipping incompatible /usr/lib/gcc/avr/4.2.2/libgcc.a when searching for -lgcc
/usr/libexec/gcc/avr/ld: skipping incompatible /usr/lib/gcc/avr/4.2.2/libgcc.a when searching for -lgcc
/usr/libexec/gcc/avr/ld: cannot find -lgcc
make: *** [blink.elf] Error 1



$ msp430-gcc -v -o hello hello.c
Reading specs from /usr/lib/gcc-lib/msp430/3.2.3/specs
Configured with:
/var/tmp/portage/cross-msp430/mspgcc-3.2.3/work/gcc-3.2.3/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/msp430/gcc-bin/3.2.3
--includedir=/usr/lib/gcc-lib/msp430/3.2.3/include
--datadir=/usr/share/gcc-data/msp430/3.2.3
--mandir=/usr/share/gcc-data/msp430/3.2.3/man
--infodir=/usr/share/gcc-data/msp430/3.2.3/info
--with-gxx-include-dir=/usr/lib/gcc-lib/msp430/3.2.3/include/g++-v3
--host=x86_64-pc-linux-gnu --target=msp430 --build=x86_64-pc-linux-gnu
--disable-altivec --enable-nls --without-included-gettext
--with-system-zlib --disable-checking --disable-werror
--enable-secureplt --disable-libunwind-exceptions --disable-libgcj
--enable-languages=c,c++
Thread model: single
gcc version 3.2.3
 /usr/lib/gcc-lib/msp430/3.2.3/cc1 -lang-c -v -D__GNUC__=3
-D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=3 -D__GXX_ABI_VERSION=102
-DMSP430 -D__MSP430__ -D__MSP430 -D__NO_INLINE__ -D__STDC_HOSTED__=1
-DMSP430_NO_HW_MUL -D__SIZE_TYPE__=unsigned int -D__PTRDIFF_TYPE__=int
-D__INT_MAX__=32767 hello.c -quiet -dumpbase hello.c -version -o
/tmp/cc6x9gDA.s
GNU CPP version 3.2.3 (cpplib) (GNU assembler syntax)
GNU C version 3.2.3 (msp430)
        compiled by GNU C version 4.1.2 (Gentoo 4.1.2).
ignoring nonexistent directory "/usr/lib/../msp430/sys-include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/oracle/10.2.0.3/client/include
 /usr/lib/gcc-lib/msp430/3.2.3/include
 /usr/lib/../msp430/include
End of search list.
 /usr/lib/gcc-lib/msp430/3.2.3/../../../../msp430/bin/as -o
/tmp/ccEnJCZ3.o /tmp/cc6x9gDA.s
 msp430-ld -m msp430x110 -o hello
/usr/lib/gcc-lib/msp430/3.2.3/../../../../msp430/lib/crt430x110.o
-L/usr/lib/gcc-lib/msp430/3.2.3
-L/usr/lib/gcc-lib/msp430/3.2.3/../../../../msp430/lib /tmp/ccEnJCZ3.o
-lgcc -lc -lgcc
msp430-ld: skipping incompatible /usr/lib/gcc-lib/msp430/3.2.3/libgcc.a
when searching for -lgcc
msp430-ld: cannot find -lgcc



as you can see, multiple crossdev platforms are affected, for me both the AVR and the MSP toolchians are broken.


as a workaround, running crossdev with the nostrip feature makes things work:

FEATURES="nostrip" crossdev -t avr

this is on amd64

Reproducible: Always




 emerge --info
Portage 2.1.3.19 (default-linux/amd64/2007.0/desktop, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-suspend2-r2 x86_64)
=================================================================
System uname: 2.6.22-suspend2-r2 x86_64 Intel(R) Core(TM)2 CPU T7200 @ 2.00GHz
Timestamp of tree: Sat, 29 Dec 2007 09:30:07 +0000
ccache version 2.4 [enabled]
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/jetty/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
LC_ALL="en_US.UTF-8"
LINGUAS="en hu ja"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/overlay1 /usr/local/portage/wolf31o2 /home/maroy/src/tyrell/src/corpora/src/tmote/src/tinyos-2-overlay /usr/local/portage/lu_zero /home/maroy/src/euedge/src/oss/svn.oss.euedge.com/packages/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X a52 aac aalib accessibility acl acpi aiglx alsa amd amd64 anthy automount avahi avi bash-completion bitmap-fonts bluetooth branding bzip2 cairo cdr cjk cli cpudetection cracklib crypt cups dbus dhcp dlloader dri dts dv dvd dvdr dvdread eds emboss encode esd evo fam fbsplash ffmpeg firefox flac gdbm gif gimpprint glitz gnome gpm gstreamer gtk gtk2 gtkhtml hal http ical iconv ieee1394 immqt-bc ipv6 irda isdnlog java javacomm jpeg kerberos lcms ldap libcaca libg++ libnotify live logrotate mad midi mikmod mmx mp3 mp4live mpeg mpeg2 mplayer msn mudflap mysql ncurses network networkmanager nls nptl nptlonly nsplugin obex ogg openal opengl openmp oracle oss pam pcre pdf pdflib perl player png postgres postscript ppds pppd python qt3 qt3support qt4 quicktime readline reflection rtsp sdl session smp sms spell spl sse sse2 ssl stream subtitles svg tcpd theora threads tiff tk truetype truetype-fonts type1-fonts udev unicode urandom usb v4l v4l2 vim vorbis wma x264 xml xorg xprint xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev joystick keyboard mouse synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en hu ja" USERLAND="GNU" VIDEO_CARDS="dummy fglrx radeon v4l vesa vmware fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Aurélien Francillon 2008-01-25 12:22:06 UTC
Well, 
i seems it's an issue only when using my overlay, try to remove my overlay from
your PORTDIR_OVERLAY and reinstall crossdev, you should then be able to build
avr gcc properly i'm investigating the problem, in the meantime you can close
this bug as invalid, i'll tell you when the problem is fixed

thanks 
Aurelien
Comment 2 SpanKY gentoo-dev 2008-01-25 12:44:04 UTC
gcc-3.2.3 does not support cross-compiling
Comment 3 Aurélien Francillon 2008-01-29 14:02:16 UTC
(In reply to comment #2)
> gcc-3.2.3 does not support cross-compiling
> 

unfortunately, mspgcc.sourceforge.net suppports only gcc-3.2.3, that's bad, but despite this fact some people find that using msp430-gcc is still more convenient than msp430-as for general purpose programming ... 
as it's also quite convenient to use gentoo instead of (ubuntu/Redhat/debian whatever, i provide some, yet quite dirty, but usually working ebuilds to make this available to myself and others ...
BTW, does mspgcc as such will never went to gentoo tree?  
What kind of ebuilds/changes would make it acceptable for inclusion in portage?  
thanks,
Aurélien

Comment 4 SpanKY gentoo-dev 2008-01-29 14:20:46 UTC
if you post a working/sane ebuild, then it can be integrated ... but no one has done the work, thus gcc-3.2.3 is not supported

you would have to convert gcc-3.2.3 to use toolchain.eclass for me to add it
Comment 5 Ákos Maróy 2008-01-29 14:23:47 UTC
Aurelien's ebuilds work for me at least.

don't know if they are sane though :)
Comment 6 Aurélien Francillon 2008-01-29 16:21:15 UTC
(In reply to comment #4)
> if you post a working/sane ebuild, then it can be integrated ... but no one has
> done the work, thus gcc-3.2.3 is not supported
> 
> you would have to convert gcc-3.2.3 to use toolchain.eclass for me to add it
> 

I uploaded the stuff, to 159213 which seems to be more related than 207284...
Would you consider reopening bug 159213 ?
Thanks
Aurélien