最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【或许解决】cygwin中编译crosstool-ng在Installing C library headers & start files阶段出错:configure: error: support for the tls_model attribute is required

crosstool-ng crifan 5549浏览 0评论

【问题】

解决:

【已解决】cygwin下编译crosstool-ng出错:make Error 254,1 [main] sh 7800 child_info_fork::abort: can’t commit memory for stack 0x28A000(90112), Win32 error 487

问题后,结果又出错:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130907.232900
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-arm920t-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.75s (at 00:33)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[INFO ]  Retrieving needed toolchain components' tarballs: done in 2.57s (at 00:36)
[INFO ]  =================================================================
[INFO ]  Extracting, patching and installing companion tools
[EXTRA]    =================================================================
[EXTRA]    Installing make
[EXTRA]    Installing make: done in 164.07s (at 03:21)
[INFO ]  Extracting, patching and installing companion tools: done in 164.94s (at 03:21)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 3.77s (at 03:25)
[EXTRA]  Saving state to restart at step 'libc_check_config'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_build'...
[EXTRA]  Saving state to restart at step 'binutils_for_build'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[EXTRA]    Configuring GMP
[EXTRA]    Building GMP
[EXTRA]    Installing GMP
[INFO ]  Installing GMP for host: done in 1350.49s (at 26:00)
[INFO ]  =================================================================
[INFO ]  Installing MPFR for host
[EXTRA]    Configuring MPFR
[EXTRA]    Building MPFR
[EXTRA]    Installing MPFR
[INFO ]  Installing MPFR for host: done in 231.85s (at 29:52)
[EXTRA]  Saving state to restart at step 'binutils_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing binutils for host
[EXTRA]    Configuring binutils
[EXTRA]    Building binutils
[EXTRA]    Installing binutils
[INFO ]  Installing binutils for host: done in 766.69s (at 42:40)
[EXTRA]  Saving state to restart at step 'cc_core_pass_1'...
[INFO ]  =================================================================
[INFO ]  Installing pass-1 core C compiler
[EXTRA]    Configuring gcc
[EXTRA]    Building gcc
[EXTRA]    Installing gcc
[INFO ]  Installing pass-1 core C compiler: done in 1193.49s (at 62:38)
[EXTRA]  Saving state to restart at step 'kernel_headers'...
[INFO ]  =================================================================
[INFO ]  Installing kernel headers
[EXTRA]    Installing kernel headers
[EXTRA]    Checking installed headers
[INFO ]  Installing kernel headers: done in 94.92s (at 64:20)
[EXTRA]  Saving state to restart at step 'libc_start_files'...
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[ERROR]    configure: error: support for the tls_model attribute is required
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
 
 
Current command:
  'BUILD_CC=i686-build_pc-cygwin-gcc' 'CFLAGS= -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 ' 'CC=arm-arm920t-linux-gnueabi-gcc    ' 'AR=arm-arm920t-linux-gnueabi-ar' 'RANLIB=arm-arm920t-linux-gnueabi-ranlib' '/usr/bin/bash' '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_17/configure' '--prefix=/usr' '--build=i686-build_pc-cygwin' '--host=arm-arm920t-linux-gnueabi' '--cache-file=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache' '--without-cvs' '--disable-profile' '--without-gd' '--with-headers=/home/develop/crosstool-ng/x-tools/arm-arm920t-linux-gnueabi/arm-arm920t-linux-gnueabi/sysroot/usr/include' '--enable-obsolete-rpc' '--enable-kernel=2.6.30' '--with-__thread' '--with-tls' '--enable-shared' '--without-fp' '--enable-add-ons=nptl,ports' '--with-pkgversion=crosstool-NG 1.18.0'
exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build
 
ct-ng:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles>

如图:

configure error support for the tls_model attribute is required

即:

configure: error: support for the tls_model attribute is required

【解决过程】

1.去看看对应的build.log:

[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[DEBUG]    Using gcc for target    : '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/bin/arm-arm920t-linux-gnueabi-gcc'
[DEBUG]    Configuring with addons : 'nptl,ports'
[DEBUG]    Extra config args passed: '--enable-obsolete-rpc --enable-kernel=2.6.30 --with-__thread --with-tls --enable-shared --without-fp --enable-add-ons=nptl,ports --with-pkgversion=crosstool-NG 1.18.0'
[DEBUG]    Extra CC args passed    : ' -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 '
[DEBUG]    Extra flags (multilib)  : ''
[DEBUG]    ==> Executing: 'BUILD_CC=i686-build_pc-cygwin-gcc' 'CFLAGS= -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 ' 'CC=arm-arm920t-linux-gnueabi-gcc    ' 'AR=arm-arm920t-linux-gnueabi-ar' 'RANLIB=arm-arm920t-linux-gnueabi-ranlib' '/usr/bin/bash' '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_17/configure' '--prefix=/usr' '--build=i686-build_pc-cygwin' '--host=arm-arm920t-linux-gnueabi' '--cache-file=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache' '--without-cvs' '--disable-profile' '--without-gd' '--with-headers=/home/develop/crosstool-ng/x-tools/arm-arm920t-linux-gnueabi/arm-arm920t-linux-gnueabi/sysroot/usr/include' '--enable-obsolete-rpc' '--enable-kernel=2.6.30' '--with-__thread' '--with-tls' '--enable-shared' '--without-fp' '--enable-add-ons=nptl,ports' '--with-pkgversion=crosstool-NG 1.18.0' 
[CFG  ]    configure: loading cache /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache
[CFG  ]    checking build system type... i686-build_pc-cygwin
[CFG  ]    checking host system type... arm-arm920t-linux-gnueabi
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking for suffix of object files... o
[CFG  ]    checking whether we are using the GNU C compiler... yes
[CFG  ]    checking whether arm-arm920t-linux-gnueabi-gcc     accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc     option to accept ISO C89... unsupported
[CFG  ]    checking for gcc... i686-build_pc-cygwin-gcc
[CFG  ]    checking how to run the C preprocessor... arm-arm920t-linux-gnueabi-gcc     -E
[CFG  ]    checking for arm-arm920t-linux-gnueabi-g++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-c++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gpp... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-aCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-CC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cxx... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cc++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cl.exe... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-FCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-KCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-RCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC_r... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC... no
[CFG  ]    checking for g++... g++
[CFG  ]    configure: WARNING: using cross tools not prefixed with host triplet
[CFG  ]    checking whether we are using the GNU C++ compiler... yes
[CFG  ]    checking whether g++ accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-readelf... arm-arm920t-linux-gnueabi-readelf
[CFG  ]    checking for sysdeps preconfigure fragments... x86_64 
[CFG  ]    configure: running configure fragment for add-on nptl
[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm9tdmi conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default
[CFG  ]    hppa ia64 m68k mips powerpc tile 
[CFG  ]    checking for assembler and linker STT_GNU_IFUNC support... no
[CFG  ]    checking whether .text pseudo-op must be used... yes
[CFG  ]    checking sysdep dirs... ports/sysdeps/unix/sysv/linux/arm/nptl ports/sysdeps/unix/sysv/linux/arm nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread ports/sysdeps/unix/sysv/linux sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/inet nptl/sysdeps/unix/sysv ports/sysdeps/unix/sysv sysdeps/unix/sysv ports/sysdeps/unix/arm nptl/sysdeps/unix ports/sysdeps/unix sysdeps/unix sysdeps/posix ports/sysdeps/arm/nptl ports/sysdeps/arm sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic
[CFG  ]    checking for a BSD-compatible install... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/tools/bin/install -c
[CFG  ]    checking whether ln -s works... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as is GNU as... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld is GNU ld... yes
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... 2.20.1.20100303, ok
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... 2.20.1.20100303, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... (cached) arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking version of arm-arm920t-linux-gnueabi-gcc    ... 4.3.2, ok
[CFG  ]    checking for gnumake... no
[CFG  ]    checking for gmake... no
[CFG  ]    checking for make... make
[CFG  ]    checking version of make... 3.81, ok
[CFG  ]    checking for gnumsgfmt... no
[CFG  ]    checking for gmsgfmt... no
[CFG  ]    checking for msgfmt... msgfmt
[CFG  ]    checking version of msgfmt... 0.18.1, ok
[CFG  ]    checking for makeinfo... makeinfo
[CFG  ]    checking version of makeinfo... 4.13, ok
[CFG  ]    checking for sed... sed
[CFG  ]    checking version of sed... 4.2.1, ok
[CFG  ]    checking for gawk... gawk
[CFG  ]    checking version of gawk... 4.0.1, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-nm... arm-arm920t-linux-gnueabi-nm
[CFG  ]    checking for autoconf... autoconf
[CFG  ]    checking whether autoconf works... yes
[CFG  ]    checking LD_LIBRARY_PATH variable... ok
[CFG  ]    checking whether GCC supports -static-libgcc... -static-libgcc
[CFG  ]    checking for bash... (cached) /bin/bash
[CFG  ]    checking for perl... /usr/bin/perl
[CFG  ]    checking for install-info... /usr/bin/install-info
[CFG  ]    checking for bison... /usr/bin/bison
[CFG  ]    checking for libc-friendly stddef.h... yes
[CFG  ]    checking whether we need to use -P to assemble .S files... no
[CFG  ]    checking for .set assembler directive... yes
[CFG  ]    checking for assembler gnu_unique_object symbol type... yes
[CFG  ]    checking for .symver assembler directive... yes
[CFG  ]    checking for ld --version-script... yes
[CFG  ]    checking for .previous assembler directive... yes
[CFG  ]    checking for .protected and .hidden assembler directive... yes
[CFG  ]    checking whether __attribute__((visibility())) is supported... yes
[CFG  ]    checking for broken __attribute__((visibility()))... no
[CFG  ]    checking for broken __attribute__((alias()))... no
[CFG  ]    checking whether to put _rtld_local into .sdata section... no
[CFG  ]    checking for .preinit_array/.init_array/.fini_array support... yes
[CFG  ]    checking whether to use .ctors/.dtors header and trailer... no
[CFG  ]    checking for libunwind-support in compiler... no
[CFG  ]    checking for linker that supports -z nodelete... yes
[CFG  ]    checking for linker that supports -z nodlopen... yes
[CFG  ]    checking for linker that supports -z initfirst... yes
[CFG  ]    configure: WARNING: missing architecture parameter to check for working -z relro
[CFG  ]    checking for -Bgroup option... yes
[CFG  ]    checking whether --noexecstack is desirable for .S files... yes
[CFG  ]    checking for -z combreloc... yes
[CFG  ]    checking for linker that supports -z execstack... yes
[CFG  ]    checking for -fpie... yes
[CFG  ]    checking for --hash-style option... yes
[CFG  ]    checking for sufficient default -shared layout... no
[CFG  ]    checking linker output format... unknown
[CFG  ]    checking for -fno-toplevel-reorder -fno-section-anchors... yes
[CFG  ]    checking for -fstack-protector... no
[CFG  ]    checking for -fgnu89-inline... yes
[CFG  ]    checking whether cc puts quotes around section names... no
[CFG  ]    checking for assembler .weak directive... yes
[CFG  ]    checking whether CFI directives are supported... yes
[CFG  ]    checking for ld --no-whole-archive... yes
[CFG  ]    checking for gcc -fexceptions... no
[CFG  ]    checking for __builtin_memset... no
[CFG  ]    checking for redirection of built-in functions... yes
[CFG  ]    checking for __thread... yes
[CFG  ]    checking for tls_model attribute... no
[ERROR]    configure: error: support for the tls_model attribute is required
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]

2.参考:

Re: Build failure in step ‘Installing C library headers & start files’

其是:

I searched the config.log and found the following error:
 >> switch -mcpu=arm1176jzf-s conflicts with -march=armv6z switch
I removed the -mcpu=arm1176jzf-s switch and the problem is fixed.

而解决了问题。

所以此处去看了看自己此处的,果然有个类似的:

[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm9tdmi conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default
[CFG  ]    hppa ia64 m68k mips powerpc tile

很是奇怪,此处对于march,都没有显示出来。

3.

(1)参考:

http://ip-conference-system.googlecode.com/svn/trunk/libavcodec/SILK_SDK_SRC_ARM_v1.0.8/Makefile

其对于S3C2440是:

CFLAGS += -mcpu=arm920t -mtune=arm920t -O3 -msoft-float -ffast-math

(2)而参考:

http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/arch/arm/Makefile

http://jhulst.com/publicsvn/captivate/kernel/linux-2.6.29/arch/arm/Makefile

http://bonsai.googlecode.com/svn-history/r488/trunk/kernel-src/linux-2.6.32.9/arch/arm/Makefile

都是:

没有-mcpu

ARM920T都是:

-mtune=arm9tdmi

(3)参考:

http://www.friendlyarm.net/forum/topic/548

其是:

–mtune=arm920t

4.关于mcpu,又去参考其他的

http://blog.csdn.net/liyunkebeyond/article/details/8645231

http://embdev.net/topic/167756

http://www.friendlyarm.net/forum/topic/2219

都是:

-mcpu=arm920t

所以,感觉还是要去:

  • 把mcpu改为arm920t(这个是众多网友的配置)

  • 把mtune改为arm9tdmi(这个是linux kernel中所用的配置)

估计就可以了。

5.通过exit 3退出编译:

ct-ng:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles> exit 3
exit
[ERROR]  >>
[ERROR]  >>  For more info on this error, look at the file: 'build.log'
[ERROR]  >>  There is a list of known issues, some with workarounds, in:
[ERROR]  >>      '/opt/crosstool-ng/share/doc/crosstool-ng/ct-ng.1.18.0/B - Known issues.txt'
[ERROR]  /
[ERROR]  (elapsed: 107:13.95)
[107:18] / /opt/crosstool-ng/bin/ct-ng:148: recipe for target `build' failed
make: *** [build] Error 1

然后去ct-ng menuconfig配置:

(armv4t) Architecture level
(arm920t) Emit assembly for CPU
(arm9tdmi) Tune for CPU

然后保存配置,退出。

再去重新,从上次出错的步骤,重新编译:

ct-ng build RESTART=libc_start_files

然后此处验证,的确是可以恢复后继续编译的:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build RESTART=libc_start_files
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130908.012002
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'libc_start_files', as requested.
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[00:43] |

结果错误依旧:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build RESTART=libc_start_files
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20130908.012002
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Restoring state at step 'libc_start_files', as requested.
[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[ERROR]    configure: error: support for the tls_model attribute is required
[ERROR]
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]
 
 
Current command:
  'BUILD_CC=i686-build_pc-cygwin-gcc' 'CFLAGS= -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 ' 'CC=arm-arm920t-linux-gnueabi-gcc    ' 'AR=arm-arm920t-linux-gnueabi-ar' 'RANLIB=arm-arm920t-linux-gnueabi-ranlib' '/usr/bin/bash' '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_17/configure' '--prefix=/usr' '--build=i686-build_pc-cygwin' '--host=arm-arm920t-linux-gnueabi' '--cache-file=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache' '--without-cvs' '--disable-profile' '--without-gd' '--with-headers=/home/develop/crosstool-ng/x-tools/arm-arm920t-linux-gnueabi/arm-arm920t-linux-gnueabi/sysroot/usr/include' '--enable-obsolete-rpc' '--enable-kernel=2.6.30' '--with-__thread' '--with-tls' '--enable-shared' '--without-fp' '--enable-add-ons=nptl,ports' '--with-pkgversion=crosstool-NG 1.18.0'
exited with error code: 1
Please fix it up and finish by exiting the shell with one of these values:
    1  fixed, continue with next build command
    2  repeat this build command
    3  abort build
 
ct-ng:/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles>

再去看看build.log:

[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[DEBUG]    Using gcc for target    : '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/bin/arm-arm920t-linux-gnueabi-gcc'
[DEBUG]    Configuring with addons : 'nptl,ports'
[DEBUG]    Extra config args passed: '--enable-obsolete-rpc --enable-kernel=2.6.30 --with-__thread --with-tls --enable-shared --without-fp --enable-add-ons=nptl,ports --with-pkgversion=crosstool-NG 1.18.0'
[DEBUG]    Extra CC args passed    : ' -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 '
[DEBUG]    Extra flags (multilib)  : ''
[DEBUG]    ==> Executing: 'BUILD_CC=i686-build_pc-cygwin-gcc' 'CFLAGS= -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm9tdmi -mtune=arm920t  -msoft-float -O -O2 ' 'CC=arm-arm920t-linux-gnueabi-gcc    ' 'AR=arm-arm920t-linux-gnueabi-ar' 'RANLIB=arm-arm920t-linux-gnueabi-ranlib' '/usr/bin/bash' '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_17/configure' '--prefix=/usr' '--build=i686-build_pc-cygwin' '--host=arm-arm920t-linux-gnueabi' '--cache-file=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache' '--without-cvs' '--disable-profile' '--without-gd' '--with-headers=/home/develop/crosstool-ng/x-tools/arm-arm920t-linux-gnueabi/arm-arm920t-linux-gnueabi/sysroot/usr/include' '--enable-obsolete-rpc' '--enable-kernel=2.6.30' '--with-__thread' '--with-tls' '--enable-shared' '--without-fp' '--enable-add-ons=nptl,ports' '--with-pkgversion=crosstool-NG 1.18.0' 
[CFG  ]    configure: loading cache /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache
[CFG  ]    checking build system type... i686-build_pc-cygwin
[CFG  ]    checking host system type... arm-arm920t-linux-gnueabi
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking for suffix of object files... o
[CFG  ]    checking whether we are using the GNU C compiler... yes
[CFG  ]    checking whether arm-arm920t-linux-gnueabi-gcc     accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc     option to accept ISO C89... unsupported
[CFG  ]    checking for gcc... i686-build_pc-cygwin-gcc
[CFG  ]    checking how to run the C preprocessor... arm-arm920t-linux-gnueabi-gcc     -E
[CFG  ]    checking for arm-arm920t-linux-gnueabi-g++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-c++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gpp... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-aCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-CC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cxx... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cc++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cl.exe... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-FCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-KCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-RCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC_r... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC... no
[CFG  ]    checking for g++... g++
[CFG  ]    configure: WARNING: using cross tools not prefixed with host triplet
[CFG  ]    checking whether we are using the GNU C++ compiler... yes
[CFG  ]    checking whether g++ accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-readelf... arm-arm920t-linux-gnueabi-readelf
[CFG  ]    checking for sysdeps preconfigure fragments... x86_64 
[CFG  ]    configure: running configure fragment for add-on nptl
[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm9tdmi conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default
[CFG  ]    hppa ia64 m68k mips powerpc tile 
[CFG  ]    checking for assembler and linker STT_GNU_IFUNC support... no
[CFG  ]    checking whether .text pseudo-op must be used... yes
[CFG  ]    checking sysdep dirs... ports/sysdeps/unix/sysv/linux/arm/nptl ports/sysdeps/unix/sysv/linux/arm nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread ports/sysdeps/unix/sysv/linux sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/inet nptl/sysdeps/unix/sysv ports/sysdeps/unix/sysv sysdeps/unix/sysv ports/sysdeps/unix/arm nptl/sysdeps/unix ports/sysdeps/unix sysdeps/unix sysdeps/posix ports/sysdeps/arm/nptl ports/sysdeps/arm sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic
[CFG  ]    checking for a BSD-compatible install... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/tools/bin/install -c
[CFG  ]    checking whether ln -s works... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as is GNU as... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld is GNU ld... yes
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... 2.20.1.20100303, ok
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... 2.20.1.20100303, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... (cached) arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking version of arm-arm920t-linux-gnueabi-gcc    ... 4.3.2, ok
[CFG  ]    checking for gnumake... no
[CFG  ]    checking for gmake... no
[CFG  ]    checking for make... make
[CFG  ]    checking version of make... 3.81, ok
[CFG  ]    checking for gnumsgfmt... no
[CFG  ]    checking for gmsgfmt... no
[CFG  ]    checking for msgfmt... msgfmt
[CFG  ]    checking version of msgfmt... 0.18.1, ok
[CFG  ]    checking for makeinfo... makeinfo
[CFG  ]    checking version of makeinfo... 4.13, ok
[CFG  ]    checking for sed... sed
[CFG  ]    checking version of sed... 4.2.1, ok
[CFG  ]    checking for gawk... gawk
[CFG  ]    checking version of gawk... 4.0.1, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-nm... arm-arm920t-linux-gnueabi-nm
[CFG  ]    checking for autoconf... autoconf
[CFG  ]    checking whether autoconf works... yes
[CFG  ]    checking LD_LIBRARY_PATH variable... ok
[CFG  ]    checking whether GCC supports -static-libgcc... -static-libgcc
[CFG  ]    checking for bash... (cached) /bin/bash
[CFG  ]    checking for perl... /usr/bin/perl
[CFG  ]    checking for install-info... /usr/bin/install-info
[CFG  ]    checking for bison... /usr/bin/bison
[CFG  ]    checking for libc-friendly stddef.h... yes
[CFG  ]    checking whether we need to use -P to assemble .S files... no
[CFG  ]    checking for .set assembler directive... yes
[CFG  ]    checking for assembler gnu_unique_object symbol type... yes
[CFG  ]    checking for .symver assembler directive... yes
[CFG  ]    checking for ld --version-script... yes
[CFG  ]    checking for .previous assembler directive... yes
[CFG  ]    checking for .protected and .hidden assembler directive... yes
[CFG  ]    checking whether __attribute__((visibility())) is supported... yes
[CFG  ]    checking for broken __attribute__((visibility()))... no
[CFG  ]    checking for broken __attribute__((alias()))... no
[CFG  ]    checking whether to put _rtld_local into .sdata section... no
[CFG  ]    checking for .preinit_array/.init_array/.fini_array support... yes
[CFG  ]    checking whether to use .ctors/.dtors header and trailer... no
[CFG  ]    checking for libunwind-support in compiler... no
[CFG  ]    checking for linker that supports -z nodelete... yes
[CFG  ]    checking for linker that supports -z nodlopen... yes
[CFG  ]    checking for linker that supports -z initfirst... yes
[CFG  ]    configure: WARNING: missing architecture parameter to check for working -z relro
[CFG  ]    checking for -Bgroup option... yes
[CFG  ]    checking whether --noexecstack is desirable for .S files... yes
[CFG  ]    checking for -z combreloc... yes
[CFG  ]    checking for linker that supports -z execstack... yes
[CFG  ]    checking for -fpie... yes
[CFG  ]    checking for --hash-style option... yes
[CFG  ]    checking for sufficient default -shared layout... no
[CFG  ]    checking linker output format... unknown
[CFG  ]    checking for -fno-toplevel-reorder -fno-section-anchors... yes
[CFG  ]    checking for -fstack-protector... no
[CFG  ]    checking for -fgnu89-inline... yes
[CFG  ]    checking whether cc puts quotes around section names... no
[CFG  ]    checking for assembler .weak directive... yes
[CFG  ]    checking whether CFI directives are supported... yes
[CFG  ]    checking for ld --no-whole-archive... yes
[CFG  ]    checking for gcc -fexceptions... no
[CFG  ]    checking for __builtin_memset... no
[CFG  ]    checking for redirection of built-in functions... yes
[CFG  ]    checking for __thread... yes
[CFG  ]    checking for tls_model attribute... no
[ERROR]    configure: error: support for the tls_model attribute is required
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]

结果发现,此处的配置,还是之前的:

-march=armv4t -mcpu=arm9tdmi -mtune=arm920t

而不是我们已经修改后的:

-march=armv4t -mcpu=arm920t -mtune=arm9tdmi

6.所以,看来需要抽空,全部清除:ct-ng clean

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng clean
  CLEAN config
  CLEAN config.gen
  CLEAN log

然后抽空再重新编译,估计才可以。

然后就继续重新编译:

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng clean
  CLEAN config
  CLEAN config.gen
  CLEAN log

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng build
[INFO ]  Performing some trivial sanity checks
[INFO ]  Build started 20131006.145456
[INFO ]  Building environment variables
[EXTRA]  Preparing working directories
[EXTRA]  Installing user-supplied crosstool-NG configuration
[EXTRA]  =================================================================
[EXTRA]  Dumping internal crosstool-NG configuration
[EXTRA]    Building a toolchain for:
[EXTRA]      build  = i686-pc-cygwin
[EXTRA]      host   = i686-pc-cygwin
[EXTRA]      target = arm-arm920t-linux-gnueabi
[EXTRA]  Dumping internal crosstool-NG configuration: done in 0.72s (at 00:31)
[INFO ]  =================================================================
[INFO ]  Retrieving needed toolchain components' tarballs
[EXTRA]    Using 'linux-custom' from custom location
[INFO ]  Retrieving needed toolchain components' tarballs: done in 2.49s (at 00:34)
[INFO ]  =================================================================
[INFO ]  Extracting, patching and installing companion tools
[EXTRA]    =================================================================
[EXTRA]    Installing make
[EXTRA]    Installing make: done in 160.31s (at 03:15)
[INFO ]  Extracting, patching and installing companion tools: done in 161.09s (at 03:15)
[INFO ]  =================================================================
[INFO ]  Extracting and patching toolchain components
[INFO ]  Extracting and patching toolchain components: done in 3.63s (at 03:19)
[EXTRA]  Saving state to restart at step 'libc_check_config'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_build'...
[EXTRA]  Saving state to restart at step 'binutils_for_build'...
[EXTRA]  Saving state to restart at step 'companion_libs_for_host'...
[INFO ]  =================================================================
[INFO ]  Installing GMP for host
[EXTRA]    Configuring GMP
[04:19] -

结果错误依旧。

[INFO ]  =================================================================
[INFO ]  Installing C library headers & start files
[EXTRA]    Configuring C library
[DEBUG]    Using gcc for target    : '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/bin/arm-arm920t-linux-gnueabi-gcc'
[DEBUG]    Configuring with addons : 'nptl,ports'
[DEBUG]    Extra config args passed: '--enable-obsolete-rpc --enable-kernel=2.6.30 --with-__thread --with-tls --enable-shared --without-fp --enable-add-ons=nptl,ports --with-pkgversion=crosstool-NG 1.18.0'
[DEBUG]    Extra CC args passed    : ' -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm920t -mtune=arm9tdmi  -msoft-float -O -O2 '
[DEBUG]    Extra flags (multilib)  : ''
[DEBUG]    ==> Executing: 'BUILD_CC=i686-build_pc-cygwin-gcc' 'CFLAGS= -U_FORTIFY_SOURCE  -mlittle-endian -march=armv4t  -mcpu=arm920t -mtune=arm9tdmi  -msoft-float -O -O2 ' 'CC=arm-arm920t-linux-gnueabi-gcc    ' 'AR=arm-arm920t-linux-gnueabi-ar' 'RANLIB=arm-arm920t-linux-gnueabi-ranlib' '/usr/bin/bash' '/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/src/eglibc-2_17/configure' '--prefix=/usr' '--build=i686-build_pc-cygwin' '--host=arm-arm920t-linux-gnueabi' '--cache-file=/home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache' '--without-cvs' '--disable-profile' '--without-gd' '--with-headers=/home/develop/crosstool-ng/x-tools/arm-arm920t-linux-gnueabi/arm-arm920t-linux-gnueabi/sysroot/usr/include' '--enable-obsolete-rpc' '--enable-kernel=2.6.30' '--with-__thread' '--with-tls' '--enable-shared' '--without-fp' '--enable-add-ons=nptl,ports' '--with-pkgversion=crosstool-NG 1.18.0' 
[CFG  ]    configure: loading cache /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/build/build-libc-startfiles/config.cache
[CFG  ]    checking build system type... i686-build_pc-cygwin
[CFG  ]    checking host system type... arm-arm920t-linux-gnueabi
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking for suffix of object files... o
[CFG  ]    checking whether we are using the GNU C compiler... yes
[CFG  ]    checking whether arm-arm920t-linux-gnueabi-gcc     accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc     option to accept ISO C89... unsupported
[CFG  ]    checking for gcc... i686-build_pc-cygwin-gcc
[CFG  ]    checking how to run the C preprocessor... arm-arm920t-linux-gnueabi-gcc     -E
[CFG  ]    checking for arm-arm920t-linux-gnueabi-g++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-c++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gpp... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-aCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-CC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cxx... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cc++... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-cl.exe... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-FCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-KCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-RCC... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC_r... no
[CFG  ]    checking for arm-arm920t-linux-gnueabi-xlC... no
[CFG  ]    checking for g++... g++
[CFG  ]    configure: WARNING: using cross tools not prefixed with host triplet
[CFG  ]    checking whether we are using the GNU C++ compiler... yes
[CFG  ]    checking whether g++ accepts -g... yes
[CFG  ]    checking for arm-arm920t-linux-gnueabi-readelf... arm-arm920t-linux-gnueabi-readelf
[CFG  ]    checking for sysdeps preconfigure fragments... x86_64 
[CFG  ]    configure: running configure fragment for add-on nptl
[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm920t conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default
[CFG  ]    hppa ia64 m68k mips powerpc tile 
[CFG  ]    checking for assembler and linker STT_GNU_IFUNC support... no
[CFG  ]    checking whether .text pseudo-op must be used... yes
[CFG  ]    checking sysdep dirs... ports/sysdeps/unix/sysv/linux/arm/nptl ports/sysdeps/unix/sysv/linux/arm nptl/sysdeps/unix/sysv/linux nptl/sysdeps/pthread sysdeps/pthread ports/sysdeps/unix/sysv/linux sysdeps/unix/sysv/linux sysdeps/gnu sysdeps/unix/inet nptl/sysdeps/unix/sysv ports/sysdeps/unix/sysv sysdeps/unix/sysv ports/sysdeps/unix/arm nptl/sysdeps/unix ports/sysdeps/unix sysdeps/unix sysdeps/posix ports/sysdeps/arm/nptl ports/sysdeps/arm sysdeps/wordsize-32 sysdeps/ieee754/flt-32 sysdeps/ieee754/dbl-64 sysdeps/ieee754 sysdeps/generic
[CFG  ]    checking for a BSD-compatible install... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/tools/bin/install -c
[CFG  ]    checking whether ln -s works... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as is GNU as... yes
[CFG  ]    checking whether /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld is GNU ld... yes
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/as... 2.20.1.20100303, ok
[CFG  ]    checking for /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld
[CFG  ]    checking version of /home/develop/crosstool-ng/crosstool-ng-1.18.0_build/.build/arm-arm920t-linux-gnueabi/buildtools/lib/gcc/arm-arm920t-linux-gnueabi/4.3.2/../../../../arm-arm920t-linux-gnueabi/bin/ld... 2.20.1.20100303, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-gcc... (cached) arm-arm920t-linux-gnueabi-gcc    
[CFG  ]    checking version of arm-arm920t-linux-gnueabi-gcc    ... 4.3.2, ok
[CFG  ]    checking for gnumake... no
[CFG  ]    checking for gmake... no
[CFG  ]    checking for make... make
[CFG  ]    checking version of make... 3.81, ok
[CFG  ]    checking for gnumsgfmt... no
[CFG  ]    checking for gmsgfmt... no
[CFG  ]    checking for msgfmt... msgfmt
[CFG  ]    checking version of msgfmt... 0.18.1, ok
[CFG  ]    checking for makeinfo... makeinfo
[CFG  ]    checking version of makeinfo... 4.13, ok
[CFG  ]    checking for sed... sed
[CFG  ]    checking version of sed... 4.2.1, ok
[CFG  ]    checking for gawk... gawk
[CFG  ]    checking version of gawk... 4.0.1, ok
[CFG  ]    checking for arm-arm920t-linux-gnueabi-nm... arm-arm920t-linux-gnueabi-nm
[CFG  ]    checking for autoconf... autoconf
[CFG  ]    checking whether autoconf works... yes
[CFG  ]    checking LD_LIBRARY_PATH variable... ok
[CFG  ]    checking whether GCC supports -static-libgcc... -static-libgcc
[CFG  ]    checking for bash... (cached) /bin/bash
[CFG  ]    checking for perl... /usr/bin/perl
[CFG  ]    checking for install-info... /usr/bin/install-info
[CFG  ]    checking for bison... /usr/bin/bison
[CFG  ]    checking for libc-friendly stddef.h... yes
[CFG  ]    checking whether we need to use -P to assemble .S files... no
[CFG  ]    checking for .set assembler directive... yes
[CFG  ]    checking for assembler gnu_unique_object symbol type... yes
[CFG  ]    checking for .symver assembler directive... yes
[CFG  ]    checking for ld --version-script... yes
[CFG  ]    checking for .previous assembler directive... yes
[CFG  ]    checking for .protected and .hidden assembler directive... yes
[CFG  ]    checking whether __attribute__((visibility())) is supported... yes
[CFG  ]    checking for broken __attribute__((visibility()))... no
[CFG  ]    checking for broken __attribute__((alias()))... no
[CFG  ]    checking whether to put _rtld_local into .sdata section... no
[CFG  ]    checking for .preinit_array/.init_array/.fini_array support... yes
[CFG  ]    checking whether to use .ctors/.dtors header and trailer... no
[CFG  ]    checking for libunwind-support in compiler... no
[CFG  ]    checking for linker that supports -z nodelete... yes
[CFG  ]    checking for linker that supports -z nodlopen... yes
[CFG  ]    checking for linker that supports -z initfirst... yes
[CFG  ]    configure: WARNING: missing architecture parameter to check for working -z relro
[CFG  ]    checking for -Bgroup option... yes
[CFG  ]    checking whether --noexecstack is desirable for .S files... yes
[CFG  ]    checking for -z combreloc... yes
[CFG  ]    checking for linker that supports -z execstack... yes
[CFG  ]    checking for -fpie... yes
[CFG  ]    checking for --hash-style option... yes
[CFG  ]    checking for sufficient default -shared layout... no
[CFG  ]    checking linker output format... unknown
[CFG  ]    checking for -fno-toplevel-reorder -fno-section-anchors... yes
[CFG  ]    checking for -fstack-protector... no
[CFG  ]    checking for -fgnu89-inline... yes
[CFG  ]    checking whether cc puts quotes around section names... no
[CFG  ]    checking for assembler .weak directive... yes
[CFG  ]    checking whether CFI directives are supported... yes
[CFG  ]    checking for ld --no-whole-archive... yes
[CFG  ]    checking for gcc -fexceptions... no
[CFG  ]    checking for __builtin_memset... no
[CFG  ]    checking for redirection of built-in functions... yes
[CFG  ]    checking for __thread... yes
[CFG  ]    checking for tls_model attribute... no
[ERROR]    configure: error: support for the tls_model attribute is required
[ERROR]  
[ERROR]  >>
[ERROR]  >>  Build failed in step 'Installing C library headers & start files'
[ERROR]  >>        called in step '(top-level)'
[ERROR]  >>
[ERROR]  >>  Error happened in: CT_DoExecLog[scripts/functions@257]
[ERROR]  >>        called from: do_libc_backend_once[scripts/build/libc/glibc-eglibc.sh-common@347]
[ERROR]  >>        called from: do_libc_backend[scripts/build/libc/glibc-eglibc.sh-common@143]
[ERROR]  >>        called from: do_libc_start_files[scripts/build/libc/glibc-eglibc.sh-common@60]
[ERROR]  >>        called from: main[scripts/crosstool-NG.sh@632]

关键的还是那几句:

[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm920t conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default

然后最后的:

[CFG  ]    checking for tls_model attribute... no
[ERROR]    configure: error: support for the tls_model attribute is required

还是配置参数不正确。

7.参考:

update sys-libs/glibc-2.15-r2 failed

以及:

Linux 发行版Gentoo讨论区

看其提到了:

emerge –info

本来打算去自己的cygwin下试试的,结果找不到:

Administrator@PC-20130611GART /home/develop
$ which emerge
which: no emerge in (/usr/local/bin:/usr/bin:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86_64:/cygdrive/c/Program Files (x86)/AMD APP/bin/x86:/cygdrive/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/cygdrive/c/Program Files/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Program Files (x86)/Common Files/Microsoft Shared/Windows Live:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:/cygdrive/c/Program Files (x86)/ATI Technologies/ATI.ACE/Core-Static:/cygdrive/c/Program Files/Microsoft/Web Platform Installer:/cygdrive/c/Program Files (x86)/Microsoft ASP.NET/ASP.NET Web Pages/v1.0:/cygdrive/c/Program Files (x86)/Windows Kits/8.0/Windows Performance Toolkit:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/cygdrive/c/Program Files (x86)/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/Tools/Binn:/cygdrive/c/Program Files/Microsoft SQL Server/100/DTS/Binn:/cygdrive/c/Program Files (x86)/Windows Live/Shared:/cygdrive/c/Program Files/Java/jdk1.7.0_25/bin:/usr/bin:/cygdrive/e/Dev_Root/docbook/tools/ant/apache-ant-1.8.4/bin:/cygdrive/e/Dev_Root/docbook/tools/fop-1.0:/cygdrive/e/dev_install_root/HTML Help Workshop:/cygdrive/e/dev_install_root/TortoiseSVN/bin:/cygdrive/e/dev_install_root/Go/bin:/cygdrive/e/Dev_Root/go/bin:/cygdrive/e/dev_install_root/Mercurial:/cygdrive/e/dev_install_root/IDM Computer Solutions/UltraEdit:/usr/lib/lapack:/opt/crosstool-ng/bin)

网上搜了下,才知道,原来emerge是Gentoo的包管理系统。

难怪此处cygwin下没有呢。

8.看到:

Re: Build failure in step ‘Installing C library headers & start files’

可以看出:

的确是,如果是

mcpu mtune march

有冲突,有错误,那么则会导致此现象。

即,其是:

[DEBUG]    CT_ARCH_TARGET_CFLAGS=' -mthumb-interwork -mlittle-endian -march=armv6z  -mcpu=arm1176jzf-s -mtune=arm1176jzf-s -mfpu=vfp -mhard-float'
[DEBUG]    CT_ARCH_TARGET_LDFLAGS=' -Wl,-EL'
[DEBUG]    CT_ARCH_TUNE=arm1176jzf-s
[DEBUG]    CT_ARCH_TUNE_CFLAG=-mtune=arm1176jzf-s
[DEBUG]    CT_ARCH_USE_MMU=y
[DEBUG]    CT_ARCH_WITH_ARCH=--with-arch=armv6z
[DEBUG]    CT_ARCH_WITH_CPU=--with-cpu=arm1176jzf-s
[DEBUG]    CT_ARCH_WITH_FLOAT=--with-float=hard
[DEBUG]    CT_ARCH_WITH_FPU=--with-fpu=vfp
[DEBUG]    CT_ARCH_WITH_TUNE=--with-tune=arm1176jzf-s

即:

-march=armv6z  -mcpu=arm1176jzf-s -mtune=arm1176jzf-s

然后去掉:

-mcpu=arm1176jzf-s

变为:

-march=armv6z -mtune=arm1176jzf-s

就可以了。

但是,我此处的配置,感觉应该是正常的,没有错误的啊。

 

9.算了,还是参考之前的:

http://ip-conference-system.googlecode.com/svn/trunk/libavcodec/SILK_SDK_SRC_ARM_v1.0.8/Makefile

的:

CFLAGS += -mcpu=arm920t -mtune=arm920t -O3 -msoft-float -ffast-math

把mcpu和mtune都改为arm920t吧:

(armv4t) Architecture level

(arm920t) Emit assembly for CPU

(arm920t) Tune for CPU

然后再去重新先

Administrator@PC-20130611GART /home/develop/crosstool-ng/crosstool-ng-1.18.0_build
$ ct-ng clean
  CLEAN config
  CLEAN config.gen
  CLEAN log

后再去编译:

ct-ng build

看看结果。

最后还是同样错误:

[CFG  ]    checking add-on ports for preconfigure fragments... aarch64 alpha am33 arm cc1: warning: switch -mcpu=arm920t conflicts with -march= switch
[CFG  ]    arm/preconfigure: Did not find ARM architecture type; using default

 

10. 没编译出结果之前,就感觉还是会同样的错误的:

因为之前是:

warning: switch -mcpu=arm9tdmi conflicts with -march= switch

后来是:

warning: switch -mcpu=arm920t conflicts with -march= switch

即,mcpu,不论是arm9tdmi还是arm920t,都还是会错误的。

(1)所以到时候还是错误的话,就删掉mcpu

(2)还是错,就换删mtune,应该就会可以的。

(3)看到之前的:

target = arm-arm920t-linux-gnueabi

猜想:不会是我此处的vendor写成arm920,而导致系统内部检测此名字,误判为mtune或者是mcpu,而导致出错了吧??

如果是的,那么到时候再改为别的,比如tq2440之类的值,再试试。

11。所以去:

(1)参考:

http://ip-conference-system.googlecode.com/svn/trunk/libavcodec/SILK_SDK_SRC_ARM_v1.0.8/Makefile

的:

ifeq (yes,$(ARM920T))
#FOR S3C2440以下二选一
#CFLAGS += -march=armv4t  -mtune=arm920t -O3 -msoft-float -ffast-math
CFLAGS += -mcpu=arm920t -mtune=arm920t -O3 -msoft-float -ffast-math

(2)对于这样的配置,后来也参考到:

http://git.openpandora.org/cgi-bin/gitweb.cgi?p=openembedded.git;a=commitdiff_plain;h=614d84bf383ec75aa55a5d2aece99f7ce43b7e41

看到有:

--- a/conf/machine/include/tune-arm920t.inc
+++ b/conf/machine/include/tune-arm920t.inc
@@ -1,4 +1,4 @@
 FEED_ARCH = "armv4t"
-PACKAGE_ARCH = "armv4t" 
+BASE_PACKAGE_ARCH = "armv4t" 
 TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
 
--- a/conf/machine/include/tune-arm9tdmi.inc
+++ b/conf/machine/include/tune-arm9tdmi.inc
@@ -1,3 +1,3 @@
 FEED_ARCH = "armv4t"
-PACKAGE_ARCH = "armv4t"
+BASE_PACKAGE_ARCH = "armv4t"
 TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi"

(3)Problem with qt4.6.3 compilation.

也有:

-march=armv4t -mtune=arm920t

决定此处去设置:

march=armv4t

mtune=arm920t

不设置mcpu

所以去,ct-ng menuconfig中配置为:

(armv4t) Architecture level

()  Emit assembly for CPU

(arm920t) Tune for CPU

然后再去重新编译看看:

最后,算是没有看到之前的错误了。

【总结】

此处,最终是:

在ct-ng menuconfig中,去掉mcpu的配置,变成:

(armv4t) Architecture level
()  Emit assembly for CPU
(arm920t) Tune for CPU 

对应的是:

-march=armv4t

-mtune=arm920t

没去设置-mcpu

最终得以避免:

configure: error: support for the tls_model attribute is required

的错误。


但是,虽然没了上面的错误,但是配置期间出现警告了:

【未解决】cygwin下编译crosstool-ng期间在配置eglibc时出现警告:checking add-on ports for preconfigure fragments… aarch64 alpha am33 arm arm/preconfigure: Did not find ARM architecture type; using default

转载请注明:在路上 » 【或许解决】cygwin中编译crosstool-ng在Installing C library headers & start files阶段出错:configure: error: support for the tls_model attribute is required

与本文相关的文章

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

网友最新评论 (1)

  1. 没有这么复杂,如果不指定mcpu项的话,可能会影响gcc对目标代码的优化。 实际上mcpu和march的冲突仅仅是警告而已,只不过在配置glibc的过程中检查 tls支持时使用了-Werror参数,使得Warnings being treated as errors, 导致配置时报错。找到glibc代码文件夹下的configure,将tls相关检查处的 -Werror删除可以绕过此问题。
    Sean11年前 (2013-11-10)回复
86 queries in 0.196 seconds, using 22.40MB memory