I tried to create a cross compile for my old Lego RCX, I use GCC 3.3.6 and NEWLIB 1.13.
When I make it, at last I got error as below, what can I do?
Code:
1. Download GCC 3.3.6 and Unzip
cd ../..
wget http://gcc.parentingamerica.com/releases/gcc-3.3.6/gcc-3.3.6.tar.gz
tar xzvf gcc-3.3.6/gcc-3.3.6.tar.gz
2. Download NEWLIB 1.13 and unzip
wget ftp://sourceware.org/pub/newlib/newlib-1.13.0.tar.gz
tar xzvf newlib-1.13.0.tar.gz
3. Link NEWLIB to GCC
cd gcc-3.3.6/
ln -s ../newlib-1.13.0/newlib .
4. Make h8300-hms build folder
cd ..
mkdir build_gcc_h8300-hms
5. Config
../gcc-3.3.6/configure --prefix=/usr/local/h8300-hms --program-prefix=h8300-hms- --target=h8300-hms --enable-languages=c,c++ --with-newlib
6. Make
make CFLAGS="-O2 -fomit-frame-pointer" all
When I make it, at last I got error as below, what can I do?
Code:
gcc -c -O2 -fomit-frame-pointer -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -DHAVE_CONFIG_H -I. -Icp -I../../gcc-3.3.6/gcc -I../../gcc-3.3.6/gcc/cp -I../../gcc-3.3.6/gcc/config -I../../gcc-3.3.6/gcc/../include ../../gcc-3.3.6/gcc/cp/cp-lang.c -o cp/cp-lang.o
gcc -O2 -fomit-frame-pointer -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -o cc1plus \
cp/call.o cp/decl.o cp/expr.o cp/pt.o cp/typeck2.o cp/class.o cp/decl2.o cp/error.o cp/lex.o cp/parse.o cp/ptree.o cp/rtti.o cp/spew.o cp/typeck.o cp/cvt.o cp/except.o cp/friend.o cp/init.o cp/method.o cp/search.o cp/semantics.o cp/tree.o cp/repo.o cp/dump.o cp/optimize.o cp/mangle.o cp/cp-lang.o attribs.o c-common.o c-format.o c-pragma.o c-semantics.o c-lex.o c-dump.o c-pretty-print.o c-opts.o main.o libbackend.a libcpp.a ./intl/libintl.a -liconv ../libiberty/libiberty.a
Undefined symbols for architecture x86_64:
"_libc_name_p", referenced from:
_nothrow_libfn_p in except.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [cc1plus] Error 1
make: *** [all-gcc] Error 2