工具链中寻找交叉编译中目标机的arch

最近在为bcm7581平台编译软件,发现要求我填入一个arch的选项,资料不全,于是开始自己确定arch到底是啥:


zhangbin@bogon:/opt/toolchains/stbgcc-4.5.3-1.3/bin$ ./mipsel-linux-uclibc-gcc

mipsel-linux-uclibc-gcc: no input files
zhangbin@bogon:/opt/toolchains/stbgcc-4.5.3-1.3/bin$ ./mipsel-linux-uclibc-gcc -v
Using built-in specs.
COLLECT_GCC=./mipsel-linux-uclibc-gcc
COLLECT_LTO_WRAPPER=/opt/toolchains/stbgcc-4.5.3-1.3/bin/../libexec/gcc/mipsel-linux-uclibc/4.5.3/lto-wrapper
Target: mipsel-linux-uclibc
Configured with: ../gcc-4.5.3/configure --target=mipsel-linux-uclibc --enable-multilib --prefix=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3 --with-local-prefix=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3/mipsel-linux-uclibc/sys-root--with-sysroot=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3/mipsel-linux-uclibc/sys-root --enable-threads=posix --enable-long-long --enable-c99 --enable-__cxa_atexit --with-gmp=/usr/src/redhat/BUILD/prereq --with-mpfr=/usr/src/redhat/BUILD/prereq --with-mpc=/usr/src/redhat/BUILD/prereq --with-libelf=/usr/src/redhat/BUILD/prereq --disable-nls --enable-symvers=gnu --enable-languages=c,c++ --enable-target-optspace --with-pkgversion='Broadcom stbgcc-4.5.3-1.3' --with-host-libstdcxx='-Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-mips-plt--with-arch=mips32 --with-float=hard
Thread model: posix
gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) 

zhangbin@bogon:/opt/toolchains/stbgcc-4.5.3-1.3/bin$ 




Configured with: ../gcc-4.5.3/configure

 --target=mipsel-linux-uclibc

--enable-multilib 

--prefix=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3

 --with-local-prefix=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3/mipsel-linux-uclibc/sys-root 

--with-sysroot=/var/tmp/stbgcc-4.5.3-1.3-root-root//opt/toolchains/stbgcc-4.5.3-1.3/mipsel-linux-uclibc/sys-root 

--enable-threads=posix 

--enable-long-long 

--enable-c99

 --enable-__cxa_atexit --with-gmp=/usr/src/redhat/BUILD/prereq 

--with-mpfr=/usr/src/redhat/BUILD/prereq 

--with-mpc=/usr/src/redhat/BUILD/prereq 

--with-libelf=/usr/src/redhat/BUILD/prereq 

--disable-nls 

--enable-symvers=gnu 

--enable-languages=c,c++

 --enable-target-optspace

 --with-pkgversion='Broadcom stbgcc-4.5.3-1.3' 

--with-host-libstdcxx='-Wl,-Bstatic,-lstdc++,-Bdynamic -lm' 

--with-mips-plt 

--with-arch=mips32 

--with-float=hard
Thread model: posix
gcc version 4.5.3 (Broadcom stbgcc-4.5.3-1.3) 


================================================

没有arch

zhangbin@bogon:/opt/arm-2011.03/bin$ ./arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/opt/arm-2011.03/bin/../libexec/gcc/arm-none-eabi/4.5.2/lto-wrapper
Target: arm-none-eabi
Configured with: /scratch/janisjo/arm-eabi-lite/src/gcc-4.5-2011.03/configure 

--build=i686-pc-linux-gnu 

--host=i686-pc-linux-gnu  编译用的主机

--target=arm-none-eabi   目标机

--enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} -D__CS_SOURCERYGXX_MAJ__=2011 -D__CS_SOURCERYGXX_MIN__=3 -D__CS_SOURCERYGXX_REV__=42 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --disable-shared --enable-lto 

--with-newlib --with-pkgversion='Sourcery G++ Lite 2011.03-42' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls

 --prefix=/opt/codesourcery --with-headers=yes 

--with-sysroot=/opt/codesourcery/arm-none-eabi 

--with-build-sysroot=/scratch/janisjo/arm-eabi-lite/install/arm-none-eabi 

--with-gmp=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr 

--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' 

--with-cloog=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr

 --with-libelf=/scratch/janisjo/arm-eabi-lite/obj/host-libs-2011.03-42-arm-none-eabi-i686-pc-linux-gnu/usr

 --disable-libgomp 

--enable-poison-system-directories 

--with-build-time-tools=/scratch/janisjo/arm-eabi-lite/install/arm-none-eabi/bin 

--with-build-time-tools=/scratch/janisjo/arm-eabi-lite/install/arm-none-eabi/bin
Thread model: single
gcc version 4.5.2 (Sourcery G++ Lite 2011.03-42) 
zhangbin@bogon:/opt/arm-2011.03/bin$ 


===============================

这个也没有arch

zhangbin@bogon:/opt/arm-2010.09/bin$ ./arm-none-linux-gnueabi-gcc -v
Using built-in specs.
COLLECT_GCC=./arm-none-linux-gnueabi-gcc
COLLECT_LTO_WRAPPER=/opt/arm-2010.09/bin/../libexec/gcc/arm-none-linux-gnueabi/4.5.1/lto-wrapper
Target: arm-none-linux-gnueabi
Configured with: /scratch/nathan/arm-lite/src/gcc-4.5-2010.09/configure --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap --disable-libssp --disable-libstdcxx-pch --enable-extra-sgxxlite-multilibs --with-arch=armv5te --with-gnu-as --with-gnu-ld --with-specs='%{save-temps: -fverbose-asm} %{funwind-tables|fno-unwind-tables|mabi=*|ffreestanding|nostdlib:;:-funwind-tables} -D__CS_SOURCERYGXX_MAJ__=2010 -D__CS_SOURCERYGXX_MIN__=9 -D__CS_SOURCERYGXX_REV__=50 %{O2:%{!fno-remove-local-statics: -fremove-local-statics}} %{O*:%{O|O0|O1|O2|Os:;:%{!fno-remove-local-statics: -fremove-local-statics}}}' --enable-languages=c,c++ --enable-shared --enable-lto --enable-symvers=gnu --enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2010.09-50' --with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls --prefix=/opt/codesourcery --with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc --with-build-sysroot=/scratch/nathan/arm-lite/install/arm-none-linux-gnueabi/libc --with-gmp=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpfr=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-mpc=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-ppl=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-cloog=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --with-libelf=/scratch/nathan/arm-lite/obj/host-libs-2010.09-50-arm-none-linux-gnueabi-i686-pc-linux-gnu/usr --disable-libgomp --enable-poison-system-directories --with-build-time-tools=/scratch/nathan/arm-lite/install/arm-none-linux-gnueabi/bin --with-build-time-tools=/scratch/nathan/arm-lite/install/arm-none-linux-gnueabi/bin
Thread model: posix
gcc version 4.5.1 (Sourcery G++ Lite 2010.09-50) 
zhangbin@bogon:/opt/arm-2010.09/bin$ 


===================================

也是arm的,海思的v200工具链:

zhangbin@bogon:/opt/hisi-linux/x86-arm/arm-hisiv200-linux/bin$ arm-hisiv200-linux-gcc -v
Using built-in specs.
Target: arm-hisiv200-linux-gnueabi
Configured with: ../gcc-4.4-2010q1/configure

 --host=i686-pc-linux-gnu 

--build=i686-pc-linux-gnu

 --target=arm-hisiv200-linux-gnueabi 

--prefix=/home/c00132816/toolchain_glibc/install/arm-hisiv200-linux 

--enable-threads 

--disable-libmudflap 

--disable-libssp

 --disable-libstdcxx-pch 

--with-arch=armv5te  果然,这个代表的目标机的体系结构

--with-gnu-as 

--with-gnu-ld 

--enable-languages=c,c++ 

--enable-shared 

--enable-lto 

--enable-symvers=gnu 

--enable-__cxa_atexit

 --disable-nls 

--enable-extra-hisi-multilibs

 --with-sysroot=/home/c00132816/toolchain_glibc/install/arm-hisiv200-linux/target

 --with-build-sysroot=/home/c00132816/toolchain_glibc/install/arm-hisiv200-linux/target 

--with-gmp=/home/c00132816/toolchain_glibc/install/host_lib 

--with-mpfr=/home/c00132816/toolchain_glibc/install/host_lib

 --with-ppl=/home/c00132816/toolchain_glibc/install/host_lib 

--with-cloog=/home/c00132816/toolchain_glibc/install/host_lib 

--with-libelf=/home/c00132816/toolchain_glibc/install/host_lib 

--with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bstatic -lm' 

--enable-libgomp --enable-poison-system-directories

 --with-libelf=/home/c00132816/toolchain_glibc/install/host_lib 

--with-pkgversion='Hisilicon_v200(gcc4.4-290+glibc-2.11+eabi+nptl)' 

--with-bugurl=http://www.hisilicon.com/cn/service/claim.html
Thread model: posix
gcc version 4.4.1 (Hisilicon_v200(gcc4.4-290+glibc-2.11+eabi+nptl)) 
zhangbin@bogon:/opt/hisi-linux/x86-arm/arm-hisiv200-linux/bin$ 



=======================================

这个是uclibc的:

这个也没有arch

zhangbin@bogon:/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/bin$ ./arm-hisi-linux-gcc -v
Reading specs from /opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/bin/../lib/gcc/arm-hisi-linux/3.4.3/specs
Configured with: ../gcc-arm/configure

--target=arm-hisi-linux 

--host=i686-pc-linux-gnu 

--with-local-prefix=/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/

 --with-sysroot=/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/

 --enable-threads=posix 

--enable-symvers=gnu 

--disable-__cxa_atexit 

--enable-languages=c,c++ 

--enable-shared 

--enable-c99

 --enable-long-long 

--prefix=/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/

 --with-float=soft 

--enable-multilib

--with-softfloat-supp
Thread model: posix
gcc version 3.4.3 (release) (CodeSourcery ARM Q3cvs 2004)
zhangbin@bogon:/opt/hisi-linux/x86-arm/gcc-3.4.3-uClibc-0.9.28/bin$ 


=========================================

gdb的时候,发现了arch的真相:

工具链中寻找交叉编译中目标机的arch_第1张图片




你可能感兴趣的:(嵌入式系统及开发)