Cross Toolchain Build중 final gcc build관련 질문입니다.

ertos12의 이미지

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 관련된 자료가 너무 없네요..

Hyun의 이미지

http://www.kegel.com/crosstool/
이걸 참고해보세요.

http://www.kegel.com/crosstool/crosstool-0.43/buildlogs/
를 보니깐 gcc까지는 빌드가 되는거 같네요.

예전에 일하던 회사에서 sh4를 사용했었는데, 어떤 회사에서 툴체인을 지원받았었는데 기억이 안나네요..

ertos12의 이미지

crosstool-0.43을 이용해도 동일한 문제점에 봉착하는데요.. 쩝~

Hyun의 이미지

위의 crosstool build matrix 에서 성공한 gcc버전을 써도 그런가요?
보니깐 gcc-4.0.2는 gdb까진 된거같은데...

ertos12의 이미지

휴~ 의외로 간단하게 해결 했네요.. kegel의 crosstool은 아직 좀 ..
스스로 해결했습니당~~

lurkingly의 이미지

스스로 어떻게 해결하셨습니까?

전 해결 못하겠습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.