Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126823 - gcc-3.4.5 produces broken m68k-elf cross-compiler
Summary: gcc-3.4.5 produces broken m68k-elf cross-compiler
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-19 09:10 UTC by B. Keroack
Modified: 2006-07-30 09:40 UTC (History)
2 users (show)

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


Attachments
Patch to enable multilib for m68k-elf. (toolchain.eclass.patch,434 bytes, patch)
2006-03-22 18:54 UTC, James Lee
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description B. Keroack 2006-03-19 09:10:04 UTC
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
Comment 1 SpanKY gentoo-dev 2006-03-19 19:08:04 UTC
that option is already available via USE=vanilla

crossdev doesnt do anything directly, it uses the existing gcc ebuilds
Comment 2 B. Keroack 2006-03-19 20:10:03 UTC
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.
Comment 3 SpanKY gentoo-dev 2006-03-20 11:41:21 UTC
that is another bug

for now, do:
USE="nopie nossp vanilla" crossdev ...
Comment 4 James Lee 2006-03-22 11:53:21 UTC
I am having the same problem.  Even with USE="vanilla nopie nossp", m68k-elf-gcc produces bad binaries.
Comment 5 SpanKY gentoo-dev 2006-03-22 12:49:45 UTC
feel free to research it and/or try diff versions of gcc ... m68k is not supported at this time
Comment 6 James Lee 2006-03-22 18:54:20 UTC
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.
Comment 7 SpanKY gentoo-dev 2006-04-09 21:22:36 UTC
should prob allow multilib to only be enabled for *-linux-* targets
Comment 8 SpanKY gentoo-dev 2006-04-09 21:28:37 UTC
err, we want multilib for elf targets ...

ive updated toolchain.eclass to only disable multilib support for linux targets