This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libitm/53113] New: Build fails in x86_avx.cc if AVX disabled but supported by as (Solaris & Linux)
- From: "windward at gmx dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 25 Apr 2012 12:26:27 +0000
- Subject: [Bug libitm/53113] New: Build fails in x86_avx.cc if AVX disabled but supported by as (Solaris & Linux)
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53113
Bug #: 53113
Summary: Build fails in x86_avx.cc if AVX disabled but
supported by as (Solaris & Linux)
Classification: Unclassified
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libitm
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: windward@gmx.com
4.7.0 fails to bootstrap on x86_64 (tested on Solaris 10 and CentOS 5.5) if the
CPU doesn't support AVX (Xeon E5420) but the assembler (GNU as 2.22) does. For
campatibility reasons I'm using "-march=core2", and GCC 4.6.3 builds without
any problem with the same build script.
checking whether
/opt/SP/build/gcc/gcc-4.7.0/host-x86_64-unknown-linux-gnu/gcc/xgcc
-B/opt/SP/build/gcc/gcc-4.7.0/host-x86_64-unknown-linux-gnu/gcc/
-B/opt/SP/gcc/gcc-4.7.0/x86_64-unknown-linux-gnu/bin/
-B/opt/SP/gcc/gcc-4.7.0/x86_64-unknown-linux-gnu/lib/ -isystem
/opt/SP/gcc/gcc-4.7.0/x86_64-unknown-linux-gnu/include -isystem
/opt/SP/gcc/gcc-4.7.0/x86_64-unknown-linux-gnu/sys-include -m32 and cc
understand -c and -o together... ../.././libitm/config/x86/x86_avx.cc:83:1:
error: Ã_ITM_TYPE_M256Ã does not name a type
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã does not
name a type
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã does not
name a type
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã does not
name a type
../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field
Ã_ITM_WM256Ã declared void
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ãptrà was not declared in
this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field
Ã_ITM_WaRM256Ã declared void
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ãptrà was not declared in
this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field
Ã_ITM_WaWM256Ã declared void
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ãptrà was not declared in
this scope
../.././libitm/config/x86/x86_avx.cc:83:1: error: Ã_ITM_TYPE_M256Ã was not
declared in this scope
../.././libitm/config/x86/x86_avx.cc:86:19: error: Ã_ITM_TYPE_M256Ã does not
name a type
../.././libitm/config/x86/x86_avx.cc:86:35: error: ISO C++ forbids declaration
of Ãptrà with no type [-fpermissive]
gmake[4]: *** [x86_avx.lo] Error 1
gmake[4]: Leaving directory
`/opt/SP/build/gcc/gcc-4.7.0/x86_64-unknown-linux-gnu/libitm'
I'm not a programmer, but on a first look the declaration of _ITM_TYPE_M256
seems to be missing if __AVX__ is not set, but HAVE_AS_AVX:
./libitm/libitm.h
# ifdef __AVX__
typedef float _ITM_TYPE_M256 __attribute__((vector_size(32), may_alias));
ITM_BARRIERS(M256)
ITM_LOG(M256)
# endif
./libitm/config/x86/x86_avx.cc
#ifndef HAVE_AS_AVX
// If we don't have an AVX capable assembler, we didn't set -mavx on the
// command-line either, which means that libitm.h defined neither this type
// nor the functions in this file. Define the type and unconditionally
// wrap the file in extern "C" to make up for the lack of pre-declaration.
typedef float _ITM_TYPE_M256 __attribute__((vector_size(32), may_alias));
#endif
But simply adding the definition (if defined(__AVX__) || defined(HAVE_AS_AVX))
just leads to an "avx vector argument without avx enabled changes the abi"
error. As said above, I'm not a programmer.
Adding "-mno-avx" does not change anything. I would expect AVX to be completely
disabled if CPU and target architecture do not support it?