Now that the gcc-3.4.3.20050110-r2 cross-compiler is working for powerpc64, I attempted to build a corresponding cross glibc for compiling powerpc64 binaries from amd64. Unfortunately, the emerge died with the following message at line 1001 in the ebuild: ppc64 crosscompile not yet supported. Bug a ppc64 dev to fill in the CDEFINE values in the glibc ebuild. This is apparently due to the fact that CDEFINE_ppc and CDEFINE_ppc64 at lines 991 and 996 (respectively) are not defined. By examination of the glibc source files, I have determined the proper values for these variables, and filled them in. I was then able to successfully emerge a cross-powerpc64 version of glibc from amd64 with this. I then verified that this toolchain will compile and link working binaries that run on ppc64 Linux. I will attach my modified ebuild that fills in the correct values, and I would appreciate it if someone could evaluate it and commit it to the portage tree if deemed acceptable. Reproducible: Always Steps to Reproduce: 1. Follow steps at http://dev.gentoo.org/~vapier/CROSS-COMPILE-HOWTO, using cross-powerpc64-unknown-linux-gnu instead of cross-hppa2.0-unknown-linux-gnu. 2. Step (7) fails with the error message mentioned in the Details section. bach ~ # emerge --info !!! Relying on the shell to locate gcc, this may break !!! DISTCC, installing gcc-config and setting your current gcc !!! profile will fix this Portage 2.0.51.19 (default-linux/amd64/2005.0, gcc-3.4.3-20050110, glibc-2.3.4.20050125-r1, 2.6.11-gentoo-r6 x86_64) ================================================================= System uname: 2.6.11-gentoo-r6 x86_64 AMD Athlon(tm) 64 Processor 3200+ Gentoo Base System version 1.6.10 Python: dev-lang/python-2.3.5 [2.3.5 (#1, Mar 28 2005, 11:04:51)] distcc 2.18.3 x86_64-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled] dev-lang/python: 2.3.5 sys-devel/autoconf: 2.59-r6, 2.13 sys-devel/automake: 1.7.9-r1, 1.8.5-r3, 1.5, 1.4_p6, 1.6.3, 1.9.5 sys-devel/binutils: 2.15.92.0.2-r8 sys-devel/libtool: 1.5.14 virtual/os-headers: 2.6.8.1-r4 ACCEPT_KEYWORDS="amd64 ~amd64" AUTOCLEAN="yes" CFLAGS="-march=athlon64 -O3 -pipe -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time" CHOST="x86_64-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/share/config /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-march=athlon64 -O3 -pipe -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs autoconfig ccache distlocks sandbox" GENTOO_MIRRORS="http://mirrors.usu.edu/mirrors/gentoo ftp://mirror.iawnet.sandia.gov/pub/gentoo http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/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="amd64 X aalib acpi alsa arts berkdb bitmap-fonts bonobo canna cdr crypt cups curl directfb esd fam flac font-server fortran gdbm gif gnome gphoto2 gpm gstreamer gtk gtkhtml guile imagemagick imlib ipv6 java jp2 jpeg kde ldap libwww lzw lzw-tiff mad motif mozilla mp3 mysql nas ncurses nls odbc oggvorbis opengl oss pam perl png postgres python qt readline ruby scanner sdl slang speex sqlite ssl tcltk tcpd tetex tiff truetype truetype-fonts type1-fonts usb userlocales xml xml2 xmms xpm xrandr xv zlib" Unset: ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS
Created attachment 56005 [details] modified ebuild script that fixes the problem
Created attachment 56502 [details, diff] glibc-cross-compile-ebuild.patch thx for info. please enlighten us with a patch next time. ;-) tgall: seems to be correct, is it?
thanks a lot!! changes commited.
Stick a fork in it!