도와주세요!!
SH4 core용으로 Cross tool chain을 구성하고 있습니다.
cross toolchain source는 다음과 같이 구성하였습니다.
binutils-2.18.50.0.8
gcc-4.2.1
glibc-2.6.1
binutils와 bootstrap gcc, glibc까지는 build를 완료 했습니다.
마지막 단계로 gcc를 build하는데 Error가 발생하는데 도통 잘 이해가 안되네요..
다음은 build config 내용입니다.
=================================================
CC=gcc CFLAGS="-g -O2" ../gcc-4.2.1/configure \
--build=i686-pc-linux-gnu \
--host=i686-pc-linux-gnu \
--target=sh4-weldk-linux --prefix=/opt/weldk10/cdk \
--enable-languages="c,c++" \
--enable-shared \
--enable-threads=posix \
--enable-nls \
--enable-c99 \
--enable-long-long \
--enable-multilib \
--enable-__cxa_atexit \
--disable-libgomp \
--enable-target-optspace
====================================================
그리고, 다음과 같은 최종 error가 발생합니다.
=====================================================
make[2]: Entering directory `/root/1work/weldk10/branch_1/build_gcc/sh4-weldk-linux/libiberty'
if [ x"" != x ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
if [ x"" != x ]; then \
/root/1work/weldk10/branch_1/build_gcc/./gcc/xgcc
-B/root/1work/weldk10/branch_1/build_gcc/./gcc/
-B/opt/weldk10/cdk/sh4-weldk-linux/bin/
-B/opt/weldk10/cdk/sh4-weldk-linux/lib/ -isystem
/opt/weldk10/cdk/sh4-weldk-linux/include -isystem
/opt/weldk10/cdk/sh4-weldk-linux/sys-include -c -DHAVE_CONFIG_H -g -Os
-I. -I../../../gcc-4.2.1/libiberty/../include -W -Wall -pedantic
-Wwrite-strings -Wstrict-prototypes -Wc++-compat
../../../gcc-4.2.1/libiberty/regex.c -o pic/regex.o; \
else true; fi
/root/1work/weldk10/branch_1/build_gcc/./gcc/xgcc
-B/root/1work/weldk10/branch_1/build_gcc/./gcc/
-B/opt/weldk10/cdk/sh4-weldk-linux/bin/
-B/opt/weldk10/cdk/sh4-weldk-linux/lib/ -isystem
/opt/weldk10/cdk/sh4-weldk-linux/include -isystem
/opt/weldk10/cdk/sh4-weldk-linux/sys-include -c -DHAVE_CONFIG_H -g -Os
-I. -I../../../gcc-4.2.1/libiberty/../include -W -Wall -pedantic
-Wwrite-strings -Wstrict-prototypes -Wc++-compat
../../../gcc-4.2.1/libiberty/regex.c -o regex.o
In file included from ../../../gcc-4.2.1/libiberty/regex.c:51:
/opt/weldk10/cdk/sh4-weldk-linux/include/sys/types.h:100: error: two or more data types in declaration specifiers
../../../gcc-4.2.1/libiberty/regex.c:130: warning: function declaration isn’t a prototype
../../../gcc-4.2.1/libiberty/regex.c:130: warning: conflicting types for built-in function ‘malloc’
../../../gcc-4.2.1/libiberty/regex.c:131: warning: function declaration isn’t a prototype
../../../gcc-4.2.1/libiberty/regex.c: In function ‘init_syntax_once’:
../../../gcc-4.2.1/libiberty/regex.c:284: warning: implicit declaration of function ‘memset’
../../../gcc-4.2.1/libiberty/regex.c:284: warning: incompatible implicit declaration of built-in function ‘memset’
In file included from ../../../gcc-4.2.1/libiberty/regex.c:638:
../../../gcc-4.2.1/libiberty/regex.c: In function ‘byte_regex_compile’:
../../../gcc-4.2.1/libiberty/regex.c:2439: warning: implicit declaration of function ‘free’
../../../gcc-4.2.1/libiberty/regex.c:3124: warning: incompatible implicit declaration of built-in function ‘memset’
../../../gcc-4.2.1/libiberty/regex.c:3253: warning: implicit declaration of function ‘strcmp’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘byte_re_compile_fastmap’:
../../../gcc-4.2.1/libiberty/regex.c:4582: warning: incompatible implicit declaration of built-in function ‘memset’
../../../gcc-4.2.1/libiberty/regex.c:4790: warning: implicit declaration of function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:4790: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:4835: warning: implicit declaration of function ‘abort’
../../../gcc-4.2.1/libiberty/regex.c:4835: warning: incompatible implicit declaration of built-in function ‘abort’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘byte_re_match_2_internal’:
../../../gcc-4.2.1/libiberty/regex.c:6747: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:6812: warning: implicit declaration of function ‘memcmp’
../../../gcc-4.2.1/libiberty/regex.c:6901: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:6958: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:7187: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:7200: warning: incompatible implicit declaration of built-in function ‘memcpy’
../../../gcc-4.2.1/libiberty/regex.c:7421: warning: incompatible implicit declaration of built-in function ‘abort’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘xre_comp’:
../../../gcc-4.2.1/libiberty/regex.c:7846: warning: implicit declaration of function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c:7846: warning: incompatible implicit declaration of built-in function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘xre_exec’:
../../../gcc-4.2.1/libiberty/regex.c:7862: warning: incompatible implicit declaration of built-in function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘xregcomp’:
../../../gcc-4.2.1/libiberty/regex.c:7961: warning: incompatible implicit declaration of built-in function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘xregexec’:
../../../gcc-4.2.1/libiberty/regex.c:8008: warning: incompatible implicit declaration of built-in function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c: In function ‘xregerror’:
../../../gcc-4.2.1/libiberty/regex.c:8078: warning: incompatible implicit declaration of built-in function ‘abort’
../../../gcc-4.2.1/libiberty/regex.c:8082: warning: incompatible implicit declaration of built-in function ‘strlen’
../../../gcc-4.2.1/libiberty/regex.c:8089: warning: implicit declaration of function ‘mempcpy’
../../../gcc-4.2.1/libiberty/regex.c:8089: warning: incompatible implicit declaration of built-in function ‘mempcpy’
../../../gcc-4.2.1/libiberty/regex.c:8096: warning: incompatible implicit declaration of built-in function ‘memcpy’
make[2]: *** [regex.o] Error 1
make[2]: Leaving directory `/root/1work/weldk10/branch_1/build_gcc/sh4-weldk-linux/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/root/1work/weldk10/branch_1/build_gcc'
make: *** [all] Error 2
[root@ertos12 build_gcc]#
configuration이 잘못된것인지.. 쩝.. 도움 부탁드립니다... SH4 관련된 자료가 너무 없네요..