[uClibc] powerpc cross compile
George Burne
george.burne at wiline.com
Tue Sep 28 16:45:40 UTC 2004
Hello,
I have searched through the archives regarding a problem I am
encountering with buildroot but cannot see any specific references to
it. I am trying to set up a buildroot environment on a Redhat Linux 9
i686 machine which will cross compile uclibc binaries for a powerpc 8245
platform. The buildroot script works just fine for i386 without
cross-compile. However when I try the powerpc cross compile version I
encounter error messages as outlined below. If anyone can see anything
obvious I would greatly appreciate your advice
*************************************************************************************************************************
/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/xgcc
-shared-libgcc
-B/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/
-nostdinc++
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3/src
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3/src/.libs
-B/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/bin/
-B/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/lib/
-isystem
/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/include
-isystem
/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/sys-include
-msoft-float -fPIC -mstrict-align -shared -nostdlib
/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/lib/crti.o
/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/nof/crtbeginS.o
.libs/allocator.o .libs/codecvt.o .libs/complex_io.o .libs/ctype.o
.libs/debug.o .libs/debug_list.o .libs/functexcept.o
.libs/globals_locale.o .libs/globals_io.o .libs/ios.o
.libs/ios_failure.o .libs/ios_init.o .libs/ios_locale.o .libs/limits.o
.libs/list.o .libs/locale.o .libs/locale_init.o .libs/locale_facets.o
.libs/localename.o .libs/stdexcept.o .libs/strstream.o .libs/tree.o
.libs/allocator-inst.o .libs/concept-inst.o .libs/fstream-inst.o
.libs/ext-inst.o .libs/io-inst.o .libs/istream-inst.o
.libs/locale-inst.o .libs/locale-misc-inst.o .libs/misc-inst.o
.libs/ostream-inst.o .libs/sstream-inst.o .libs/streambuf-inst.o
.libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o
.libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o
.libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o
.libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o
.libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive
../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a
-Wl,--no-whole-archive
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3/src
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3/src/.libs
-lm ../libmath/.libs/libmath.a -lm
../libsupc++/.libs/libsupc++convenience.a -lm
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/nof
-L/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc
-L/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/bin
-L/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/lib
-L/home/george/ppc/buildroot/build_powerpc/staging_dir/lib/gcc/powerpc-linux-uclibc/3.4.0/nof
-L/home/george/ppc/buildroot/build_powerpc/staging_dir/lib/gcc/powerpc-linux-uclibc/3.4.0
-L/home/george/ppc/buildroot/build_powerpc/staging_dir/lib/gcc/powerpc-linux-uclibc/3.4.0/../../../../powerpc-linux-uclibc/lib
-lgcc_s_nof -lc -lgcc_s_nof -lm -lgcc_s_nof -lc -lgcc_s_nof
/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/nof/crtsavres.o
/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/gcc/nof/crtendS.o
/home/george/ppc/buildroot/build_powerpc/staging_dir/powerpc-linux-uclibc/lib/crtn.o
-Wl,-O1 -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname
-Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.0
`.gnu.linkonce.t._ZNSdD1Ev' referenced in section `.got2' of
.libs/fstream-inst.o: defined in discarded section
`.gnu.linkonce.t._ZNSdD1Ev' of .libs/fstream-inst.o
`.gnu.linkonce.t._ZNSdD0Ev' referenced in section `.got2' of
.libs/fstream-inst.o: defined in discarded section
`.gnu.linkonce.t._ZNSdD0Ev' of .libs/fstream-inst.o
`.gnu.linkonce.t._ZNSdD2Ev' referenced in section `.got2' of
.libs/sstream-inst.o: defined in discarded section
`.gnu.linkonce.t._ZNSdD2Ev' of .libs/sstream-inst.o
collect2: ld returned 1 exit status
make[7]: *** [libstdc++.la] Error 1
make[7]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3/src'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3'
make[5]: *** [all] Error 2
make[5]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/nof/libstdc++-v3'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/libstdc++-v3'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/libstdc++-v3'
make[2]: *** [all] Error 2
make[2]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/powerpc-linux-uclibc/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory
`/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final'
make: ***
[/home/george/ppc/buildroot/toolchain_build_powerpc/gcc-3.4.0-final/.compiled]
Error 2
*************************************************************************************************************************
My Makefile is as follows:-
# Makefile for a simple busybox/uClibc root filesystem
#
# Copyright (C) 2001-2004 Erik Andersen <andersen at codepoet.org>
# Copyright (C) 2002 by Tim Riker <Tim at Rikers.org>
# Copyright (C) 2004 Manuel Novoa III <mjn3 at uclibc.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Library General Public License as
# published by the Free Software Foundation; either version 2 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Library General Public License for more details.
#
# You should have received a copy of the GNU Library General Public
# License along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
#############################################################
#
# EDIT this stuff to suit your system and preferences
#
# Use := when possible to get precomputation, thereby
# speeding up the build process.
#
#############################################################
# What sort of target system shall we compile this for?
#
#ARCH:=i386
#ARCH:=arm
#ARCH:=armeb
#ARCH:=mips
#ARCH:=mipsel
ARCH:=powerpc
#ARCH:=sh4
#ARCH:=cris
#ARCH:=sh64
#ARCH:=m68k
#ARCH:=v850
#ARCH:=sparc
#ARCH:=whatever
# Choose the kernel headers to use for kernel-headers target. This is
# ignored if you are building your own kernel or using the system kernel.
#
#DEFAULT_KERNEL_HEADERS:=2.4.25
DEFAULT_KERNEL_HEADERS:=2.4.27
#DEFAULT_KERNEL_HEADERS:=2.6.7
#DEFAULT_KERNEL_HEADERS:=2.6.8
# Choose gcc version.
# WARNING -- 2.95 currently only builds for i386, arm, mips*, and powerpc.
# WARNING -- 2.95 does not currently build natively for the target.
#
#GCC_VERSION:=2.95
#GCC_VERSION:=3.3.3
#GCC_VERSION:=3.3.4
GCC_VERSION:=3.4.0
#GCC_VERSION:=3.4.1
#GCC_VERSION:=3.4.2
# Choose binutils version.
#
#BINUTILS_VERSION:=2.14.90.0.6
#BINUTILS_VERSION:=2.14.90.0.7
#BINUTILS_VERSION:=2.14.90.0.8
#BINUTILS_VERSION:=2.15
#BINUTILS_VERSION:=2.15.90.0.1
#BINUTILS_VERSION:=2.15.90.0.1.1
#BINUTILS_VERSION:=2.15.90.0.2
#BINUTILS_VERSION:=2.15.90.0.3
#BINUTILS_VERSION:=2.15.91.0.1
BINUTILS_VERSION:=2.15.91.0.2
# Choose gdb version.
#
#GDB_VERSION:=5.3
GDB_VERSION:=6.1.1
#GDB_VERSION:=6.2
# Enable this to use the uClibc daily snapshot instead of a released
# version. Daily snapshots may contain new features and bugfixes. Or
# they may not even compile at all, depending on what Erik is doing.
# Do you wish to use the latest release (), latest snapshot (snapshot),
# or the snapshot from a specific date (yyyymmdd)? Note that snapshots
# may contain new features and bugfixes. Or they may not even compile
# at all, depending on what Erik and Manuel are doing.
#
#USE_UCLIBC_SNAPSHOT:=
USE_UCLIBC_SNAPSHOT:=snapshot
#USE_UCLIBC_SNAPSHOT:=20040807
# Do you wish to use the latest release (), latest snapshot (snapshot),
# or the snapshot from a specific date (yyyymmdd)? Note that snapshots
# may contain new features and bugfixes. Or they may not even compile
# at all...
#
#USE_BUSYBOX_SNAPSHOT:=
USE_BUSYBOX_SNAPSHOT:=snapshot
#USE_BUSYBOX_SNAPSHOT:=20040807
# Enable large file (files > 2 GB) support
BUILD_WITH_LARGEFILE:=true
# Command used to download source code
WGET:=wget --passive-ftp
# Optimize toolchain for which type of CPU?
OPTIMIZE_FOR_CPU=$(ARCH)
#OPTIMIZE_FOR_CPU=i686
# Note... gcc 2.95 does not seem to like anything higher than i586.
#OPTIMIZE_FOR_CPU=i586
#OPTIMIZE_FOR_CPU=whatever
# Might be worth experimenting with for gcc 3.4.x.
GCC_WITH_CPU:=
GCC_WITH_ARCH:=
GCC_WITH_TUNE:=
#GCC_WITH_CPU:=--with-cpu=
#GCC_WITH_ARCH:=--with-arch=
#GCC_WITH_TUNE:=--with-tune=
# Soft floating point options.
# Notes:
# Builds for gcc 3.4.x.
# Can build for gcc 3.3.x for mips, mipsel, powerpc, and arm (special)
# by using custom specs files (currently for 3.3.4 only).
# NOTE!!! The libfloat stuff is currently removed from uClibc. The
# arm soft float for 3.3.x will require reenabling it.
# (i386 support will be added back in at some point.)
# Only tested with multilib enabled.
# For i386, long double is the same as double (64 bits). While this
# is unusual for x86, it seemed the best approach considering the
# limitations in the gcc floating point emulation library.
# For arm, soft float uses the usual libfloat routines.
# (Un)comment the appropriate line below.
#SOFT_FLOAT:=true
SOFT_FLOAT:=false
TARGET_OPTIMIZATION=-Os
TARGET_DEBUGGING= #-g
# Currently the unwind stuff seems to work for staticly linked apps but
# not dynamic. So use setjmp/longjmp exceptions by default.
GCC_USE_SJLJ_EXCEPTIONS:=--enable-sjlj-exceptions
#GCC_USE_SJLJ_EXCEPTIONS:=
# Any additional gcc options you may want to include....
EXTRA_GCC_CONFIG_OPTIONS:=
# Enable the following if you want locale/gettext/i18n support.
# NOTE! Currently the pregnerated locale stuff only works for x86!
#ENABLE_LOCALE:=true
ENABLE_LOCALE:=false
# If you want multilib enabled, enable this...
MULTILIB:=--enable-multilib
# Build/install c++ compiler and libstdc++?
INSTALL_LIBSTDCPP:=true
# Build/install java compiler and libgcj? (requires c++)
# WARNING!!! DOES NOT BUILD FOR TARGET WITHOUT INTERVENTION!!! mjn3
#INSTALL_LIBGCJ:=true
INSTALL_LIBGCJ:=false
# For SMP machines some stuff can be run in parallel
#JLEVEL=-j3
#############################################################
#
# The list of stuff to build for the target filesystem
#
#############################################################
TARGETS:=host-sed
TARGETS+=uclibc-configured binutils gcc ccache
# Are you building your own kernel? Perhaps you have a kernel
# you have already configured and you want to use that? The
# default is to just use a set of known working kernel headers.
# Unless you want to build a kernel, I recommend just using
# that...
TARGETS+=kernel-headers
#TARGETS+=linux
#TARGETS+=system-linux
# The default minimal set
TARGETS+=busybox #tinylogin
# Openssh...
TARGETS+=zlib openssl openssh
# Dropbear sshd is much smaller than openssl + openssh
#TARGETS+=dropbear_sshd
# Everything needed to build a full uClibc development system!
TARGETS+=coreutils findutils bash make diffutils patch sed
TARGETS+=ed flex bison file gawk tar grep bzip2
#If you want a development system, you probably want gcc built
# with uClibc so it can run within your dev system...
TARGETS+=gcc_target ccache_target
# Of course, if you are installing a development system, you
# may want some header files so you can compile stuff....
TARGETS+=ncurses-headers zlib-headers openssl-headers
# More development system stuff for those that want it
TARGETS+=m4 autoconf automake libtool
# Some nice debugging tools for the host
#TARGETS+=gdbclient
# Some nice debugging tools for the target
#TARGETS+=gdbserver gdb_target
#TARGETS+=strace ltrace
# The Valgrind debugger (x86 only)
#TARGETS+=valgrind
# Some stuff for access points and firewalls
TARGETS+=iptables hostap wtools dhcp_relay bridge
TARGETS+=iproute2 netsnmp
# Run customize.mk at the very end to add your own special config.
# This is useful for making your own distro within the buildroot
# process.
# TARGETS+=customize
#############################################################
#
# Pick your root filesystem type.
#
#############################################################
TARGETS+=ext2root
# Must mount cramfs with 'ramdisk_blocksize=4096'
#TARGETS+=cramfsroot
# You may need to edit make/jffs2root.mk to change target
# endian-ness or similar, but this is sufficient for most
# things as-is...
#TARGETS+=jffs2root
#############################################################
#
# You should probably leave this stuff alone unless you know
# what you are doing.
#
#############################################################
--
Best Regards,
George Burne
WiLine Networks Inc.
Cell : +1-408-806-5596
Office : +1-408-872-0692
Fax : +1-734-939-6050
More information about the uClibc
mailing list