When using crossdev to produce a ColdFire development environment for Rockbox (http://www.rockbox.org), the m68k-elf stage1 gcc (3.4.5) silently produces broken binaries (the devices being developed crash on startup). A manually created vanilla 3.4.5 cross compiler and binutils produces working binaries as expected. There appears to be an incompatibility introduced by one or more of the patches crossdev applies that do not exist in upstream GCC. As a possible workaround, crossdev should allow the option of a vanilla GCC build or the patchset should be reduced as much as possible for embedded development. emerge info: Portage 2.0.54 (default-linux/x86/2005.0, gcc-4.0.2, glibc-2.4-r0, 2.6.15-gentoo i686) ================================================================= System uname: 2.6.15-gentoo i686 AMD Athlon(tm) XP 2600+ Gentoo Base System version 1.6.14 ccache version 2.3 [enabled] dev-lang/python: 2.3.5-r2, 2.4.2 sys-apps/sandbox: 1.2.12 sys-devel/autoconf: 2.13, 2.59-r7 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 sys-devel/binutils: 2.16.1 sys-devel/libtool: 1.5.22 virtual/os-headers: 2.6.8.1-r1, 2.6.11-r2 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -march=athlon-xp -mfpmath=sse" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" CXXFLAGS="-O3 -march=athlon-xp -mfpmath=sse" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict userpriv usersandbox" GENTOO_MIRRORS="http://mirrors.acm.cs.rpi.edu/gentoo http://mirrors.tds.net/gentoo http://mirror.clarkson.edu/pub/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 3dnow X a52 aac acl acpi alsa audiofile avi berkdb bitmap-fonts bonobo bzip2 cdr crypt cups curl dri dvd eds emboss encode ethereal exif expat faad fam ffmpeg firefox flac foomaticdb gd gdbm gif glut gmp gnome gphoto2 gtk gtk2 gtkhtml hal idn imagemagick imlib ipv6 jpeg junit lcms libg++ libwww mad mikmod mmap mng motif mp3 mpeg ncurses nptl nptlonly offensive ogg oggvorbis opengl pam pcre pdflib perl pic png ppds python quicktime readline real sdl slang spell sse ssl svga tcpd tetex tiff truetype truetype-fonts type1-fonts udev usb vorbis xine xml xml2 xmms xv xvid zlib userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
that option is already available via USE=vanilla crossdev doesnt do anything directly, it uses the existing gcc ebuilds
I just tried doing: # USE=vanilla /usr/sbin/crossdev --gcc 3.4.5 -s1 -t m68k-elf but the gcc ebuild failed on applying 03_all_gcc-3.4.0-v8.7.6.1-pie-arm.patch (why is the ebuild applying these patches if it is supposed to be doing a vanilla build?). crossdev clobbers any settings put in /etc/portage/packages.use beforehand, necessitating the use of the environment variable USE.
that is another bug for now, do: USE="nopie nossp vanilla" crossdev ...
I am having the same problem. Even with USE="vanilla nopie nossp", m68k-elf-gcc produces bad binaries.
feel free to research it and/or try diff versions of gcc ... m68k is not supported at this time
Created attachment 82900 [details, diff] Patch to enable multilib for m68k-elf. After a bit of trial-and-error, I've discovered that multilib is needed to produce the correct binaries. I guess there are many different versions of the m68k that need to be accounted for. Anyways, all of that USE="vanilla no..." was unnecessary. I hope my patch isn't too hackish. I figured that if they are doing it for avr, there shouldn't be a problem for m68k-elf.
should prob allow multilib to only be enabled for *-linux-* targets
err, we want multilib for elf targets ... ive updated toolchain.eclass to only disable multilib support for linux targets