embeded/raspberry pi2016. 9. 26. 20:55

커널 빌드 할 때

arm-linux-gnueabihf-gcc

이런걸 볼 수 있는데

ARM용 리눅스에 있는 gcc 패키지랑은 차이가 있을까?


$ gcc -v

Using built-in specs.

COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper

Target: arm-linux-gnueabihf

Configured with: ../src/configure -v --with-pkgversion='Raspbian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf

Thread model: posix

gcc version 4.9.2 (Raspbian 4.9.2-10) 


~/tools/arm-bcm2708/arm-bcm2708hardfp-linux-gnueabi/bin $ arm-linux-gnueabihf-gcc -v

Using built-in specs.

COLLECT_GCC=arm-linux-gnueabihf-gcc

COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper

Target: arm-linux-gnueabihf

Configured with: ../src/configure -v --with-pkgversion='Raspbian 4.9.2-10' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf

Thread model: posix

gcc version 4.9.2 (Raspbian 4.9.2-10)


비교해보니 차이가 없다?!?

즉, 우분투에 들은 gcc는 커널빌드 하는데 써도 문제 없는 동일한 녀석이다 라는거?


[링크 : http://stackoverflow.com/.../arm-gcc-toolchain-as-arm-elf-or-arm-none-eabi-what-is-the-difference]

[링크 : https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=99127]

[링크 : http://elinux.org/Raspberry_Pi_Kernel_Compilation]

[링크 : http://elinux.org/RPi_Linaro_GCC_Compilation]


+

~/tools/arm-bcm2708 $ ll

total 20

drwxr-xr-x 7 pi pi 4096 Sep 26 23:28 arm-bcm2708hardfp-linux-gnueabi

drwxr-xr-x 7 pi pi 4096 Sep 26 23:26 arm-bcm2708-linux-gnueabi

drwxr-xr-x 8 pi pi 4096 Sep 26 23:28 arm-rpi-4.9.3-linux-gnueabihf

drwxr-xr-x 7 pi pi 4096 Sep 26 23:30 gcc-linaro-arm-linux-gnueabihf-raspbian

drwxr-xr-x 7 pi pi 4096 Sep 26 23:29 gcc-linaro-arm-linux-gnueabihf-raspbian-x64 


일단은 다 x86/x86-64용 크로스컴파일러네..

$ file arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-gcc

arm-bcm2708hardfp-linux-gnueabi/bin/arm-bcm2708hardfp-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, BuildID[sha1]=e2801f48a84144e2b40d6083baac317057662b3c, stripped


$ file arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc

arm-bcm2708-linux-gnueabi/bin/arm-bcm2708-linux-gnueabi-gcc: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, BuildID[sha1]=7b34f10a2af2e57b673121196522143f50868487, stripped


$ file arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
arm-rpi-4.9.3-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=e0df943f126fe91df411d950dd26652126a1e06d, stripped

$ file gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc-4.8.3
gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc-4.8.3: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.6.15, stripped

 $ file gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc-4.8.3
gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc-4.8.3: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=04d49c97b46fb3d971e496e6721137f6bab56342, stripped

얘는 라즈베리 gcc 패키지

 $ file /usr/bin/gcc-4.9

/usr/bin/gcc-4.9: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=f711b7c3e25f3a887b6908bb3ef6d1cefba92340, stripped



Posted by 구차니