ARM 용 툴체인 설치 관련 질문 드립니다.

paeksj98의 이미지

arm용으로 설치 중인데 왜이런지 조언 구합니다.
질문 내용이 좀 길어도 이해 해주시고 한번씩 봐주세요.

tar -jxvf linux-2.6.23.8.tar.bz2
cd linux-2.6.23.8
gzip ../patch-2.6.23.8-my.gz | patch -p1
make xconfig

cd cross4.1
tar -jxvf gdb-6.4.tar.bz2
cd gdb-6.4
mkdir build
cd build
../configure --target=arm-linux --build=i686-pc-linux-gnu --prefix=/usr
make
make install

tar -jxvf binutil-2.16.1.tar.bz2
cd binutils-2.16.1
mkdir build
cd build
../configure --target=arm-linux --prefix=/usr --program-prefix=arm-linux-
make;make install
cd ../../

==> gcc 컴파일 하기전
vi gcc/config/arm/t-linux
TARGET_LIBGCC2_CFLAGS = -fomit-frame-pointer -fPIC -Dinhibit_libc -D__gthr_posix_h

LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_lnx \
_negdf2 _addsubdf3 _muldivdf3 _cmpdf2 _unorddf2 _fixdfsi _fixunsdfsi \
_truncdfsf2 _negsf2 _addsubsf3 _muldivsf3 _cmpsf2 _unordsf2 \
_fixsfsi _fixunssfsi
요렇게 수정하고.
vi gcc/config/arm/linux-elf.h
#define LIBGCC_SPEC "%{msoft-float:-lfloat} %{mfloat-abi=soft*:-lfloat} -lgcc"
==>#define LIBGCC_SPEC "-lgcc"
어렇게 수정 마무리 했습니다.

tar -jxvf gcc-4.1.0.tar.bz2
cd gcc-4.1.0
mkdir build
cd build
../configure --target=arm-linux --prefix=/usr --with-headers=/home/work/linux-2.6.23.8/include/ --disable-shared --disable-threads --enable-languages="c" --nfp --with-cpu=arm9tdmi --without-fp --with-float=soft
make

==>error
SHLIB_EXT='.so' \
SHLIB_MULTILIB='' \
SHLIB_MKMAP='../../gcc/mkmap-symver.awk' \
SHLIB_MKMAP_OPTS='' \
SHLIB_MAPFILES='../../gcc/libgcc-std.ver ../../gcc/config/libgcc-glibc.ver ../../gcc/config/libgcc-glibc.ver' \
SHLIB_NM_FLAGS='-pg' \
MULTILIB_OSDIRNAMES='' \
ASM_HIDDEN_OP='' \
GCC_FOR_TARGET='/home/work/cross4.1/gcc-4.1.0/build/./gcc/xgcc -B/home/work/cross4.1/gcc-4.1.0/build/./gcc/ -B/usr/arm-linux/bin/ -B/usr/arm-linux/lib/ -isystem /usr/arm-linux/include -isystem /usr/arm-linux/sys-include' \
mkinstalldirs='/bin/sh ../../gcc/../mkinstalldirs' \
/bin/sh mklibgcc > tmp-libgcc.mk
mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \
/bin/sh ../../gcc/mkconfig.sh tconfig.h
tconfig.h is unchanged
/home/work/cross4.1/gcc-4.1.0/build/./gcc/xgcc -B/home/work/cross4.1/gcc-4.1.0/build/./gcc/ -B/usr/arm-linux/bin/ -B/usr/arm-linux/lib/ -isystem /usr/arm-linux/include -isystem /usr/arm-linux/sys-include -O2 -O2 -g -O2 -DIN_GCC -DCROSS_COMPILE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -isystem ./include -I. -I. -I../../gcc -I../../gcc/. -I../../gcc/../include -I../../gcc/../libcpp/include -g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-initialized-in-bss -fno-unit-at-a-time \
-c ../../gcc/crtstuff.c -DCRT_BEGIN \
-o crtbegin.o
In file included from ../../gcc/crtstuff.c:68:
../../gcc/tsystem.h:90:19: error: stdio.h: 그런 파일이나 디렉토리가 없음 ==>/usr/include에 파일은 있는데 왜이런지
../../gcc/tsystem.h:93:23: error: sys/types.h: 그런 파일이나 디렉토리가 없음
../../gcc/tsystem.h:96:19: error: errno.h: 그런 파일이나 디렉토리가 없음
../../gcc/tsystem.h:103:20: error: string.h: 그런 파일이나 디렉토리가 없음
../../gcc/tsystem.h:104:20: error: stdlib.h: 그런 파일이나 디렉토리가 없음
../../gcc/tsystem.h:105:20: error: unistd.h: 그런 파일이나 디렉토리가 없음
../../gcc/tsystem.h:111:18: error: time.h: 그런 파일이나 디렉토리가 없음
make[2]: *** [crtbegin.o] 오류 1
make[2]: Leaving directory `/home/work/cross4.1/gcc-4.1.0/build/gcc'
make[1]: *** [all-gcc] 오류 2
make[1]: Leaving directory `/home/work/cross4.1/gcc-4.1.0/build'
make: *** [all] 오류 2

==> vi config.log
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
configure:600: checking host system type
configure:621: checking target system type
configure:639: checking build system type
configure:694: checking for a BSD compatible install
configure:747: checking whether ln works
configure:771: checking whether ln -s works
configure:1825: checking for gcc
configure:1938: checking whether the C compiler (gcc ) works
configure:1954: gcc -o conftest conftest.c 1>&5
configure:1980: checking whether the C compiler (gcc ) is a cross-compiler
configure:1985: checking whether we are using GNU C
configure:2013: checking whether gcc accepts -g
configure:2080: checking for gnatbind
configure:2145: checking whether compiler driver understands Ada
configure:2177: checking how to compare bootstrapped objects
configure:2275: checking for correct version of gmp.h
configure:2288: gcc -c -g -O2 conftest.c 1>&5
configure:2301: checking for MPFR
configure:2314: gcc -o conftest -g -O2 conftest.c -lmpfr -lgmp 1>&5
configure:3313: checking for bison
configure:3353: checking for bison
configure:3392: checking for gm4
configure:3431: checking for flex
configure:3471: checking for flex
configure:3510: checking for makeinfo
configure:3563: checking for expect
configure:3604: checking for runtest
configure:3652: checking for i686-pc-linux-gnu-ar
configure:3727: checking for i686-pc-linux-gnu-as
configure:3802: checking for i686-pc-linux-gnu-dlltool
configure:3833: checking for dlltool
configure:3877: checking for i686-pc-linux-gnu-ld
configure:3952: checking for i686-pc-linux-gnu-lipo
configure:3983: checking for lipo
configure:4027: checking for i686-pc-linux-gnu-nm
configure:4102: checking for i686-pc-linux-gnu-ranlib
configure:4172: checking for i686-pc-linux-gnu-strip
configure:4242: checking for i686-pc-linux-gnu-windres
configure:4273: checking for windres
configure:4317: checking for i686-pc-linux-gnu-objcopy
configure:4392: checking for i686-pc-linux-gnu-objdump
configure:4474: checking for arm-linux-ar
configure:4549: checking for arm-linux-as
configure:4624: checking for arm-linux-cc
configure:4624: checking for arm-linux-gcc
configure:4699: checking for arm-linux-c++
configure:4699: checking for arm-linux-g++
configure:4699: checking for arm-linux-cxx
configure:4699: checking for arm-linux-gxx
configure:4774: checking for arm-linux-dlltool
configure:4849: checking for arm-linux-gcc
configure:4919: checking for arm-linux-gcj
configure:4994: checking for arm-linux-gfortran
configure:5069: checking for arm-linux-ld
configure:5144: checking for arm-linux-lipo
configure:5219: checking for arm-linux-nm
configure:5294: checking for arm-linux-objdump
configure:5369: checking for arm-linux-ranlib
configure:5439: checking for arm-linux-strip
configure:5514: checking for arm-linux-windres
configure:5588: checking where to find the target ar
configure:5613: checking where to find the target as
configure:5638: checking where to find the target cc
configure:5663: checking where to find the target c++
configure:5691: checking where to find the target c++ for libstdc++
configure:5719: checking where to find the target dlltool
configure:5744: checking where to find the target gcc
configure:5769: checking where to find the target gcj
configure:5797: checking where to find the target gfortran
configure:5825: checking where to find the target ld
configure:5850: checking where to find the target lipo
configure:5865: checking where to find the target nm
configure:5890: checking where to find the target objdump
configure:5915: checking where to find the target ranlib
configure:5940: checking where to find the target strip
configure:5965: checking where to find the target windres
configure:6018: checking whether to enable maintainer-specific portions of Makefiles
configure:6065: checking if symbolic links between directories work

긴 질문을 봐주셔서 정말 감사합니다.
앞으로 삽질할것도 많은데 여기서 막혀서 헤매고 있네요..
/usr/include 에 파일은 있는데 왜 못찾고 있는지..
혹 다른 문제 때문에 발생하는건지 감을 못잡고 있습니다
그럼 오늘 하루도 다들 수고하세요.

tobetter의 이미지

아실지도 모르겠지만 http://www.kegel.com/crosstool/ 에 가시면 크로스 툴체인이 한방에 잘 빌드하도록 스크립트가 만들어져 있고, 버젼들만 잘 맞춰주면 빌드 잘 됩니다. ^^;

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.