Build configured with: --with-arch=corei7-avx --with-cpu=corei7-avx --prefix=/usr/local --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-ppl=/opt/gnu --with-cloog=/opt/gnu i686-linux --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc Build fail: cd bld; \ CC="gcc -m32" CXX="g++ -m32" ../src-trunk/configure \ --with-arch=corei7-avx --with-cpu=corei7-avx --prefix=/usr/local --enable-clocale=gnu --with-system-zlib --enable-shared --with-demangler-in-ld --enable-cloog-backend=isl --with-ppl=/opt/gnu --with-cloog=/opt/gnu i686-linux --with-fpmath=sse --enable-languages=c,c++,fortran,java,lto,objc configure: WARNING: you should use --build, --host, --target checking build system type... i686-pc-linux-gnu checking host system type... i686-pc-linux-gnu checking target system type... i686-pc-linux-gnu grep "Error " makelog.181267.trunk.i686.corei7-avx >> makelog.181267.trunk.i686.corei7-avx.mail; \ checking for magic_open in -lmagic... make[7]: *** [x86_avx.lo] Error 1 make[6]: *** [all-recursive] Error 1 make[5]: *** [all] Error 2 make[4]: *** [all-target-libitm] Error 2 make[3]: *** [bootstrap] Error 2 make[2]: *** [bootstrap] Error 2 .......
Most likely it is revision 181261
You are omitting the important details how exactly it failed. E.g. grep -C6 x86_avx makelog.181267.trunk.i686.corei7-avx
Created attachment 25815 [details] make output The additional information (make log grep) is attached.
It looks that your assembler doesn't support AVX, so a fallback is triggered in config/x86/x86_avx.cc: #ifdef HAVE_AS_AVX ... #define OUTPUT(T) _ITM_TYPE_##T #define INPUT(T,X) , _ITM_TYPE_##T X #else ... #define OUTPUT(T) void #define INPUT(T,X) #endif #define ITM_READ_MEMCPY(T, LSMOD, TARGET, M2) \ OUTPUT(T) ITM_REGPARM _ITM_##LSMOD##T (const _ITM_TYPE_##T *ptr) \ ... The problem is, that declarations in libitm.h do not agree with this: #define ITM_BARRIERS(T) \ extern _ITM_TYPE_##T _ITM_R##T(const _ITM_TYPE_##T *) ITM_REGPARM; \ extern _ITM_TYPE_##T _ITM_RaR##T(const _ITM_TYPE_##T *) ITM_REGPARM; \ extern _ITM_TYPE_##T _ITM_RaW##T(const _ITM_TYPE_##T *) ITM_REGPARM; \ extern _ITM_TYPE_##T _ITM_RfW##T(const _ITM_TYPE_##T *) ITM_REGPARM; \ ...
... which will not be declared if AVX support is disavowed. ... except that the configure was --with-arch=corei7-avx. If true, the problem is user error. How can you expect to configure for corei7-avx without a working avx assembler? Otherwise, we've mis-identified the assembler support and this is a configure bug. Only the reporter can tell us which of these alternatives hold. --- I suppose we could change the configure check to be #ifndef __AVX__ asm ("vzeroupper"); #endif assuming that if --with-arch/CFLAGS says avx is present, believe it. Let this fail later (again as user error) if the assembler can't actually assemble AVX insns.
Bootstrap fail was caused by later commit (revision 181246): ------------------------------------------------------------------------ r181246 | rth | 2011-11-10 04:29:38 +0400 (Thu, 10 Nov 2011) | 1 line Changed paths: M /trunk/libitm/ChangeLog M /trunk/libitm/acinclude.m4 M /trunk/libitm/config/x86/x86_avx.cc M /trunk/libitm/config.h.in M /trunk/libitm/configure M /trunk/libitm/configure.ac libitm: Work around assembler missing AVX insns. 181154 aldyh fi 181154 aldyh 181246 rth case "${target_cpu}" in 181246 rth i345686 | x86_64) 181246 rth { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler supports AVX" >&5 181246 rth $as_echo_n "checking if the assembler supports AVX... " >&6; } 181246 rth if test "${libitm_cv_as_avx+set}" = set; then : 181246 rth $as_echo_n "(cached) i345686 shoud be i[3456]86 That is why HAVE_AS_AVX was not set for i686 target_cpu.
I have a patch.
Author: uros Date: Wed Nov 16 14:51:13 2011 New Revision: 181408 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181408 Log: PR bootstrap/51098 * acinclude.m4 (LIBITM_CHECK_AS_AVX): Fix target selector. * configure: Regenerate. Modified: trunk/libitm/ChangeLog trunk/libitm/acinclude.m4 trunk/libitm/configure
Should be fixed now.