This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
gcc crosscompile for PPC, Please help!
- From: ashok <ashok dot shanmugam at wipro dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 24 Sep 2007 11:49:09 +0530
- Subject: gcc crosscompile for PPC, Please help!
Hi All,
I wanted to install gcc-3.4 on my ppc-linux m/c. I tried cross
compiling, but cought up with error which i'm not familiar with as i'm
new here.
The following is the error log on make:
---------------------------------------------------------------------------------------------
[root@crazy gcc_build]# make
make[1]: Entering directory
`/home/ashok/gcc_build/build-i386-linux/libiberty'
make[2]: Entering directory
`/home/ashok/gcc_build/build-i386-linux/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/ashok/gcc_build/build-i386-linux/libiberty/testsuite'
make[2]: Entering directory
`/home/ashok/gcc_build/build-i386-linux/libiberty'
if [ -z "" ]; then \
true; \
else \
rootpre=`${PWDCMD-pwd}`/; export rootpre; \
srcrootpre=`cd ../../../gcc-3.4.4/libiberty; ${PWDCMD-pwd}`/; export
srcrootpre; \
lib=`echo ${rootpre} | sed -e 's,^.*/\([^/][^/]*\)/$,\1,'`; \
compiler="gcc"; \
for i in `${compiler} --print-multi-lib 2>/dev/null`; do \
dir=`echo $i | sed -e 's/;.*$//'`; \
if [ "${dir}" = "." ]; then \
true; \
else \
if [ -d ../${dir}/${lib} ]; then \
flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
if (cd ../${dir}/${lib}; make "AR=ar" "AR_FLAGS=rc" "CC=gcc"
"CFLAGS=-g -O2" "DESTDIR=" "LIBCFLAGS=-g -O2" "EXTRA_OFILES="
"HDEFINES=" "INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install
-c -m 644" "INSTALL_PROGRAM=/usr/bin/install -c" "LDFLAGS=" "LOADLIBES="
"RANLIB=ranlib" "SHELL=/bin/sh" "prefix=/usr/local"
"exec_prefix=/usr/local" "libdir=/usr/local/lib" "libsubdir=" "tooldir=" \
CFLAGS="-g -O2 ${flags}" \
prefix="/usr/local" \
exec_prefix="/usr/local" \
GCJFLAGS=" ${flags}" \
CXXFLAGS=" ${flags}" \
LIBCFLAGS="-g -O2 ${flags}" \
LIBCXXFLAGS=" ${flags}" \
LDFLAGS=" ${flags}" \
MULTIFLAGS="${flags}" \
DESTDIR="" \
INSTALL="/usr/bin/install -c" \
INSTALL_DATA="/usr/bin/install -c -m 644" \
INSTALL_PROGRAM="/usr/bin/install -c" \
INSTALL_SCRIPT="" \
all); then \
true; \
else \
exit 1; \
fi; \
else true; \
fi; \
fi; \
done; \
fi
make[2]: Leaving directory
`/home/ashok/gcc_build/build-i386-linux/libiberty'
make[1]: Leaving directory
`/home/ashok/gcc_build/build-i386-linux/libiberty'
make[1]: Entering directory `/home/ashok/gcc_build/libiberty'
make[2]: Entering directory `/home/ashok/gcc_build/libiberty/testsuite'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/ashok/gcc_build/libiberty/testsuite'
make[1]: Leaving directory `/home/ashok/gcc_build/libiberty'
make[1]: Entering directory `/home/ashok/gcc_build/intl'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/ashok/gcc_build/intl'
make[1]: Entering directory `/home/ashok/gcc_build/zlib'
: make ; exec true "AR_FLAGS=rc" "CC_FOR_BUILD=gcc" "CFLAGS=-g -O2"
"CXXFLAGS=-g -O2" "CFLAGS_FOR_BUILD=" "CFLAGS_FOR_TARGET=-O2 -g -O2"
"INSTALL=/usr/bin/install -c" "INSTALL_DATA=/usr/bin/install -c -m 644"
"INSTALL_PROGRAM=/usr/bin/install -c" "INSTALL_SCRIPT=/usr/bin/install
-c" "LDFLAGS=" "LIBCFLAGS=-g -O2" "LIBCFLAGS_FOR_TARGET=-O2 -g -O2"
"MAKE=make" "MAKEINFO=makeinfo --split-size=5000000 " "PICFLAG="
"PICFLAG_FOR_TARGET=" "SHELL=/bin/sh" "EXPECT=expect" "RUNTEST=runtest"
"RUNTESTFLAGS=" "exec_prefix=/usr/local" "infodir=/usr/local/info"
"libdir=/usr/local/lib" "prefix=/usr/local"
"tooldir=/usr/local/ppc-linux"
"AR=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-ar"
"AS=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-as"
"CC=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-gcc"
"CXX=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-g++"
"LD=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-ld" "LIBCFLAGS=-g -O2"
"NM=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-nm" "PICFLAG=" "RANLIB=:"
"DESTDIR=" DO=all multi-do
make[1]: Leaving directory `/home/ashok/gcc_build/zlib'
make[1]: Entering directory `/home/ashok/gcc_build/gcc'
powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-gcc -g -O2 -DIN_GCC -W -Wall
-Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic
-Wno-long-long -DHAVE_CONFIG_H -o cc1 \
c-parse.o c-lang.o c-pretty-print.o stub-objc.o attribs.o
c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o c-convert.o
c-aux-info.o c-common.o c-opts.o c-format.o c-semantics.o c-incpath.o
cppdefault.o c-ppoutput.o c-cppbuiltin.o prefix.o c-objc-common.o
c-dump.o c-pch.o libcpp.a rs6000-c.o main.o libbackend.a
../libiberty/libiberty.a
/opt/WindRiver/gnu/3.4.4-wrlinux-1.3/x86-linux2/bin/../lib/gcc/powerpc-wrs-linux-gnu/3.4.4/../../../../powerpc-wrs-linux-gnu/bin/ld:
crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
make[1]: *** [cc1] Error 1
make[1]: Leaving directory `/home/ashok/gcc_build/gcc'
make: *** [all-gcc] Error 2
----------------------------------------------------------------------------------------------------------------------------------------------------------
This is how i configured :
[root@crazy gcc_build]# ../gcc-3.4.4/configure --host=ppc-linux
--target=ppc-linux --build=i386-linux
This is how i set my cross-compiler :
export
PATH=$PATH:/opt/WindRiver/gnu/3.4.4-wrlinux-1.3/x86-linux2/powerpc-wrs-linux-gnu/bin
export CC=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-gcc
export CXX=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-g++
export LD=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-ld
export NM=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-nm
export AR=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-ar
export AS=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-as
export CPP=powerpc-wrs-linux-gnu-ppc7400-glibc_cgl-cpp
Please help me where i'm wrong....
Thanks
Ashok