기존 이솝 임베디드 포럼의 지식인 서비스가 게시판 형태로 변경되었습니다.

안녕하세요.
궁금한 사항이 있어서 이렇게 질문을 다시 올리게 되었네요 ^^

크로스컴파일된 gcc의 버전을 알고 싶은데요 ....

# arm-unknown-linux-gnu-gcc --version
arm-unknown-linux-gnu-gcc (GCC) 3.4.1
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

이렇게 하면 3.4.1 버전이라는 것을 알 수 있잖아요.
제가 알고 싶은 것은 gcc의 버전이 아니라 arm버전이거든요.

]# arm-unknown-linux-gnu-gcc -v
Reading specs from /opt/crosstool/gcc-3.4.1-glibc-2.3.2/arm-unknown-linux-gnu/bin/../lib/gcc/arm-unknown-linux-gnu/3.4.1/specs
Configured with: /ojt/crosstool-0.42/build/arm-unknown-linux-gnu/gcc-3.4.1-glibc-2.3.2/gcc-3.4.1/configure --target=arm-unknown-linux-gnu --host=i686-host_pc-linux-gnu --prefix=/ojt/crosstool/gcc-3.4.1-glibc-2.3.2/arm-unknown-linux-gnu --with-headers=/ojt/crosstool/gcc-3.4.1-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu/include --with-local-prefix=/ojt/crosstool/gcc-3.4.1-glibc-2.3.2/arm-unknown-linux-gnu/arm-unknown-linux-gnu --disable-nls --enable-threads=posix --enable-symvers=gnu --enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99 --enable-long-long
Thread model: posix
gcc version 3.4.1

-v옵션을 주니 이렇게도 나오네요. 그래서 스펙 파일을 보았는데
아래와 같네요.

# arm-unknown-linux-gnu-gcc --version
arm-unknown-linux-gnu-gcc (GCC) 3.4.1
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[root@host crosstool-0.42]# cat /opt/crosstool/gcc-3.4.1-glibc-2.3.2/arm-unknown-linux-gnu/bin/../lib/gcc/arm-unknown-linux-gnu/3.4.1/specs
*asm:
%{mbig-endian:-EB} %{mlittle-endian:-EL} %{mcpu=*:-mcpu=%*} %{march=*:-march=%*} %{mapcs-*:-mapcs-%*} %(subtarget_asm_float_spec) %{mthumb-interwork:-mthumb-interwork} %(subtarget_extra_asm_spec)

*asm_debug:
%{gstabs*:--gstabs}%{!gstabs*:%{g*:--gdwarf2}}

*asm_final:


*asm_options:
%a %Y %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}

*invoke_as:
%{!S:-o %|.s |
as %(asm_options) %m.s %A }

*cpp:
%(cpp_cpu_arch) %(subtarget_cpp_spec)                   %{mapcs-32:%{mapcs-26: %e-mapcs-26 and -mapcs-32 may not be used together}}             %{msoft-float:%{mhard-float:                                                    %e-msoft-float and -mhard_float may not be used together}}      %{mbig-endian:%{mlittle-endian:%e-mbig-endian and -mlittle-endian may not be used together}}

*cpp_options:
%(cpp_unique_options) %1 %{m*} %{std*} %{ansi} %{W*&pedantic*} %{w} %{f*} %{g*:%{!g0:%{!fno-working-directory:-fworking-directory}}} %{O*} %{undef}

*cpp_debug_options:
%{d*}

*cpp_unique_options:
%{C|CC:%{!E:%eGCC does not support -C or -CC without -E}} %{!Q:-quiet} %{nostdinc*} %{C} %{CC} %{v} %{I*} %{P} %I %{MD:-MD %{!o:%b.d}%{o*:%.d%*}} %{MMD:-MMD %{!o:%b.d}%{o*:%.d%*}} %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*} %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}} %{trigraphs} %{remap} %{g3:-dD} %{H} %C %{D*&U*&A*} %{i*} %Z %i %{E|M|MM:%W{o*}}

*trad_capable_cpp:
cc1 -E %{traditional|ftraditional|traditional-cpp:-traditional-cpp}

*cc1:
%{profile:-p}

*cc1_options:
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}} %1 %{!Q:-quiet} -dumpbase %B %{d*} %{m*} %{a*} %{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}%{!c:%{!S:-auxbase %b}} %{g*} %{O*} %{W*&pedantic*} %{w} %{std*} %{ansi} %{v:-version} %{pg:-p} %{p} %{f*} %{undef} %{Qn:-fno-ident} %{--help:--help} %{--target-help:--target-help} %{!fsyntax-only:%{S:%W{o*}%{!o*:-o %b.s}}} %{fsyntax-only:-o %j} %{-param*}

*cc1plus:


*link_gcc_c_sequence:
%{static:--start-group} %G %L %{static:--end-group}%{!static:%G}

*endfile:
%{!shared:crtend.o%s} %{shared:crtendS.o%s} crtn.o%s

*link:
%{!static:--eh-frame-hdr} %{h*} %{version:-v}    %{b} %{Wl,*:%*}    %{static:-Bstatic}    %{shared:-shared}    %{symbolic:-Bsymbolic}    %{rdynamic:-export-dynamic}    %{!dynamic-linker:-dynamic-linker /lib/ld-linux.so.2}    -X    %{mbig-endian:-EB} %{mlittle-endian:-EL} -m armelf_linux -p

*lib:
%{pthread:-lpthread}    %{shared:-lc}    %{!shared:%{profile:-lc_p}%{!profile:-lc}}

*libgcc:
%{static|static-libgcc:-lgcc -lgcc_eh}%{!static:%{!static-libgcc:%{!shared-libgcc:-lgcc --as-needed -lgcc_s%M --no-as-needed}%{shared-libgcc:-lgcc_s%M%{!shared: -lgcc}}}}

*startfile:
%{!shared:      %{pg:gcrt1.o%s} %{!pg:%{p:gcrt1.o%s}                   %{!p:%{profile:gcrt1.o%s}                         %{!profile:crt1.o%s}}}}    crti.o%s %{!shared:crtbegin.o%s} %{shared:crtbeginS.o%s}

*switches_need_spaces:


*cross_compile:
1

*version:
3.4.1

*multilib:
. ;

*multilib_defaults:
marm mlittle-endian mhard-float mapcs-32 mno-thumb-interwork

*multilib_extra:


*multilib_matches:


*multilib_exclusions:


*multilib_options:


*linker:
collect2

*link_libgcc:
%D

*md_exec_prefix:


*md_startfile_prefix:


*md_startfile_prefix_1:


*startfile_prefix_spec:


*sysroot_suffix_spec:


*sysroot_hdrs_suffix_spec:


*cpp_cpu_arch:
%{march=arm2:-D__ARM_ARCH_2__} %{march=arm250:-D__ARM_ARCH_2__} %{march=arm3:-D__ARM_ARCH_2__} %{march=arm6:-D__ARM_ARCH_3__} %{march=arm600:-D__ARM_ARCH_3__} %{march=arm610:-D__ARM_ARCH_3__} %{march=arm7:-D__ARM_ARCH_3__} %{march=arm700:-D__ARM_ARCH_3__} %{march=arm710:-D__ARM_ARCH_3__} %{march=arm720:-D__ARM_ARCH_3__} %{march=arm7100:-D__ARM_ARCH_3__} %{march=arm7500:-D__ARM_ARCH_3__} %{march=arm7500fe:-D__ARM_ARCH_3__} %{march=arm7m:-D__ARM_ARCH_3M__} %{march=arm7dm:-D__ARM_ARCH_3M__} %{march=arm7dmi:-D__ARM_ARCH_3M__} %{march=arm7tdmi:-D__ARM_ARCH_4T__} %{march=arm8:-D__ARM_ARCH_4__} %{march=arm810:-D__ARM_ARCH_4__} %{march=arm9:-D__ARM_ARCH_4T__} %{march=arm920:-D__ARM_ARCH_4__} %{march=arm920t:-D__ARM_ARCH_4T__} %{march=arm9tdmi:-D__ARM_ARCH_4T__} %{march=strongarm:-D__ARM_ARCH_4__} %{march=strongarm110:-D__ARM_ARCH_4__} %{march=strongarm1100:-D__ARM_ARCH_4__} %{march=xscale:-D__ARM_ARCH_5TE__} %{march=xscale:-D__XSCALE__} %{march=ep9312:-D__ARM_ARCH_4T__} %{march=ep9312:-D__MAVERICK__} %{march=armv2:-D__ARM_ARCH_2__} %{march=armv2a:-D__ARM_ARCH_2__} %{march=armv3:-D__ARM_ARCH_3__} %{march=armv3m:-D__ARM_ARCH_3M__} %{march=armv4:-D__ARM_ARCH_4__} %{march=armv4t:-D__ARM_ARCH_4T__} %{march=armv5:-D__ARM_ARCH_5__} %{march=armv5t:-D__ARM_ARCH_5T__} %{march=armv5e:-D__ARM_ARCH_5E__} %{march=armv5te:-D__ARM_ARCH_5TE__} %{!march=*:  %{mcpu=arm2:-D__ARM_ARCH_2__}  %{mcpu=arm250:-D__ARM_ARCH_2__}  %{mcpu=arm3:-D__ARM_ARCH_2__}  %{mcpu=arm6:-D__ARM_ARCH_3__}  %{mcpu=arm600:-D__ARM_ARCH_3__}  %{mcpu=arm610:-D__ARM_ARCH_3__}  %{mcpu=arm7:-D__ARM_ARCH_3__}  %{mcpu=arm700:-D__ARM_ARCH_3__}  %{mcpu=arm710:-D__ARM_ARCH_3__}  %{mcpu=arm720:-D__ARM_ARCH_3__}  %{mcpu=arm7100:-D__ARM_ARCH_3__}  %{mcpu=arm7500:-D__ARM_ARCH_3__}  %{mcpu=arm7500fe:-D__ARM_ARCH_3__}  %{mcpu=arm7m:-D__ARM_ARCH_3M__}  %{mcpu=arm7dm:-D__ARM_ARCH_3M__}  %{mcpu=arm7dmi:-D__ARM_ARCH_3M__}  %{mcpu=arm7tdmi:-D__ARM_ARCH_4T__}  %{mcpu=arm8:-D__ARM_ARCH_4__}  %{mcpu=arm810:-D__ARM_ARCH_4__}  %{mcpu=arm9:-D__ARM_ARCH_4T__}  %{mcpu=arm920:-D__ARM_ARCH_4__}  %{mcpu=arm920t:-D__ARM_ARCH_4T__}  %{mcpu=arm9tdmi:-D__ARM_ARCH_4T__}  %{mcpu=strongarm:-D__ARM_ARCH_4__}  %{mcpu=strongarm110:-D__ARM_ARCH_4__}  %{mcpu=strongarm1100:-D__ARM_ARCH_4__}  %{mcpu=xscale:-D__ARM_ARCH_5TE__}  %{mcpu=xscale:-D__XSCALE__}  %{mcpu=ep9312:-D__ARM_ARCH_4T__}  %{mcpu=ep9312:-D__MAVERICK__}  %{mcpu=iwmmxt:-D__ARM_ARCH_5TE__}  %{mcpu=iwmmxt:-D__XSCALE__}  %{mcpu=iwmmxt:-D__IWMMXT__}  %{!mcpu*:%(cpp_cpu_arch_default)}}

*cpp_cpu_arch_default:
-D__ARM_ARCH_3__

*subtarget_cpp_spec:
%{posix:-D_POSIX_SOURCE} %{fPIC|fPIE:-D__PIC__ -D__pic__} %{fpic|fpie:-D__PIC__ -D__pic__}

*subtarget_extra_asm_spec:


*subtarget_asm_float_spec:
%{mapcs-float:-mfloat} %{msoft-float:-mfpu=softfpa}

*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:    %(linker) %l %{pie:-pie} %X %{o*} %{A} %{d} %{e*} %{m} %{N} %{n} %{r}    %{s} %{t} %{u*} %{x} %{z} %{Z} %{!A:%{!nostdlib:%{!nostartfiles:%S}}}    %{static:} %{L*} %(link_libgcc) %o %{fprofile-arcs|fprofile-generate:-lgcov}    %{!nostdlib:%{!nodefaultlibs:%(link_gcc_c_sequence)}}    %{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} }}}}}}

역시 gcc버전만 나와있고 arm버전은 알 수가 없네요...

혹시 arm버전을 알 수 있는 방법이 있을까요???

고현철

2006.12.15 00:42:19
*.117.46.252

arm-linux-gcc -dumpspecs를 하면

밑에쯤에...

*cpp_cpu_arch:
%{march=arm2:-D__ARM_ARCH_2__} %{march=arm250:-D__ARM_ARCH_2__} %{march=arm3:-D__ARM_ARCH_2__} %{march=arm6:-D__ARM_ARCH_3__} %{march=arm600:-D__ARM_ARCH_3__} %{march=arm610:-D__ARM_ARCH_3__} %{march=arm7:-D__ARM_ARCH_3__} %{march=arm700:-D__ARM_ARCH_3__} %{march=arm710:-D__ARM_ARCH_3__} %{march=arm720:-D__ARM_ARCH_3__} %{march=arm7100:-D__ARM_ARCH_3__} %{march=arm7500:-D__ARM_ARCH_3__} %{march=arm7500fe:-D__ARM_ARCH_3__} %{march=arm7m:-D__ARM_ARCH_3M__} %{march=arm7dm:-D__ARM_ARCH_3M__} %{march=arm7dmi:-D__ARM_ARCH_3M__} %{march=arm7tdmi:-D__ARM_ARCH_4T__} %{march=arm8:-D__ARM_ARCH_4__} %{march=arm810:-D__ARM_ARCH_4__} %{march=arm9:-D__ARM_ARCH_4T__} %{march=arm920:-D__ARM_ARCH_4__} %{march=arm920t:-D__ARM_ARCH_4T__} %{march=arm9tdmi:-D__ARM_ARCH_4T__} %{march=strongarm:-D__ARM_ARCH_4__} %{march=strongarm110:-D__ARM_ARCH_4__} %{march=strongarm1100:-D__ARM_ARCH_4__} %{march=xscale:-D__ARM_ARCH_5TE__} %{march=xscale:-D__XSCALE__} %{march=armv2:-D__ARM_ARCH_2__} %{march=armv2a:-D__ARM_ARCH_2__} %{march=armv3:-D__ARM_ARCH_3__} %{march=armv3m:-D__ARM_ARCH_3M__} %{march=armv4:-D__ARM_ARCH_4__} %{march=armv4t:-D__ARM_ARCH_4T__} %{march=armv5:-D__ARM_ARCH_5__} %{march=armv5t:-D__ARM_ARCH_5T__} %{march=armv5e:-D__ARM_ARCH_5E__} %{march=armv5te:-D__ARM_ARCH_5TE__} %{!march=*: %{mcpu=arm2:-D__ARM_ARCH_2__} %{mcpu=arm250:-D__ARM_ARCH_2__} %{mcpu=arm3:-D__ARM_ARCH_2__} %{mcpu=arm6:-D__ARM_ARCH_3__} %{mcpu=arm600:-D__ARM_ARCH_3__} %{mcpu=arm610:-D__ARM_ARCH_3__} %{mcpu=arm7:-D__ARM_ARCH_3__} %{mcpu=arm700:-D__ARM_ARCH_3__} %{mcpu=arm710:-D__ARM_ARCH_3__} %{mcpu=arm720:-D__ARM_ARCH_3__} %{mcpu=arm7100:-D__ARM_ARCH_3__} %{mcpu=arm7500:-D__ARM_ARCH_3__} %{mcpu=arm7500fe:-D__ARM_ARCH_3__} %{mcpu=arm7m:-D__ARM_ARCH_3M__} %{mcpu=arm7dm:-D__ARM_ARCH_3M__} %{mcpu=arm7dmi:-D__ARM_ARCH_3M__} %{mcpu=arm7tdmi:-D__ARM_ARCH_4T__} %{mcpu=arm8:-D__ARM_ARCH_4__} %{mcpu=arm810:-D__ARM_ARCH_4__} %{mcpu=arm9:-D__ARM_ARCH_4T__} %{mcpu=arm920:-D__ARM_ARCH_4__} %{mcpu=arm920t:-D__ARM_ARCH_4T__} %{mcpu=arm9tdmi:-D__ARM_ARCH_4T__} %{mcpu=strongarm:-D__ARM_ARCH_4__} %{mcpu=strongarm110:-D__ARM_ARCH_4__} %{mcpu=strongarm1100:-D__ARM_ARCH_4__} %{mcpu=xscale:-D__ARM_ARCH_5TE__} %{mcpu=xscale:-D__XSCALE__} %{!mcpu*:%(cpp_cpu_arch_default)}}


이런녀석이 나옵니다. 이 녀석들을 지원한다고 보시면 됩니다.
대신 컴파일시 mcpu나 march 옵션을 줘야합니다.

박상수

2006.12.15 02:24:35
*.94.41.89

아 제가 본 spec 파일과 동일한 내용이군요 ^^
저는 컴파일러가 하나의 버전만을 지원하는 줄 알았거든요.
이렇게 많은 버전을 지원해줄 줄이야 ^^;
오늘도 감사합니다 고도리님 ~~~
List of Articles
번호 제목 글쓴이 날짜 조회 수
908 chmod관련 질문.. [완료] [2] 박기호 2006-12-19 874
907 MPEG4 자료를 찾고 있습니다. ==> [완료] [3] 이영재 2006-12-19 697
906 UTP Cable은 다이렉트인가요 크로스인가요? <완료!> [2] 김재우 2006-12-18 802
905 aesop 3차 보드가 동작을 안합니다...ㅠ <=== [완료] [4] 전병우 2006-12-18 1063
904 [NAND] 파일 복사 문제 [5] 김유석 2006-12-16 997
903 모듈 strip 관련 질문 [완료] [5] 박상수 2006-12-15 786
902 use-serial 컨버터 질문 [2] 이태간 2006-12-15 772
901 [re] use-serial 컨버터 질문[완료] [1] 이태간 2006-12-18 654
900 troll-ftp..에서요.. < === 완료 [3] 윤현승 2006-12-15 712
» gcc컴파일러 arm버전 확인에 관하여...[완료] [2] 박상수 2006-12-15 1430
898 [NAND] NAND의 nand_scan() 에 대해 질문 드립니다.[완료] [3] 김유석 2006-12-14 950
897 busybox에서 질문입니다.. < === 완료 [4] 윤현승 2006-12-13 870
896 2.6.13 커널 clock관련 질문입니다. [완료] [6] 박기호 2006-12-13 782
895 [SMC91C113] ping 테스트를 하면 커널 패닉이 발생합니다.[완료] [4] 김유석 2006-12-12 1148
894 gdbserver & gdb 에 대해서 질문 <== 완료[자답] [5] 황기천 2006-12-12 1065
893 xinit 관련해서 질문입니다~ [3] 오용석 2006-12-12 622
892 [질문] PDS 게시판에 올린 VGA to Composite 관련 질문이요~[완... [2] 양용현 2006-12-11 714
891 I2C 통신을 하는 FOST02A칩을 보드에 달으려고 하는데요 (참조글) 방창혁 2006-12-08 712
890 I2C 통신을 하는 FOST02A칩을 보드에 달으려고 하는데요[완료] [6] 유태경 2006-12-08 1267
889 usb gadget 관련.. [완료] [1] 박기호 2006-12-08 908

사용자 로그인