From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1501 invoked by alias); 25 Apr 2012 12:26:47 -0000 Received: (qmail 1477 invoked by uid 22791); 25 Apr 2012 12:26:45 -0000 X-SWARE-Spam-Status: No, hits=-3.6 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_AV X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 25 Apr 2012 12:26:32 +0000 From: "windward at gmx dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libitm/53113] New: Build fails in x86_avx.cc if AVX disabled but supported by as (Solaris & Linux) Date: Wed, 25 Apr 2012 12:26:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libitm X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: windward at gmx dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-04/txt/msg02238.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D53113 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=3Dcore2", and GCC 4.6.3 builds with= out 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: =C3=A2_ITM_TYPE_M256=C3=A2 does not name a type ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 does not name a type ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 does not name a type ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 does not name a type ../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field =C3=A2_ITM_WM256=C3=A2 declared void ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2ptr=C3=A2 was not d= eclared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field =C3=A2_ITM_WaRM256=C3=A2 declared void ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2ptr=C3=A2 was not d= eclared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: variable or field =C3=A2_ITM_WaWM256=C3=A2 declared void ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2ptr=C3=A2 was not d= eclared in this scope ../.././libitm/config/x86/x86_avx.cc:83:1: error: =C3=A2_ITM_TYPE_M256=C3= =A2 was not declared in this scope ../.././libitm/config/x86/x86_avx.cc:86:19: error: =C3=A2_ITM_TYPE_M256=C3= =A2 does not name a type ../.././libitm/config/x86/x86_avx.cc:86:35: error: ISO C++ forbids declarat= ion of =C3=A2ptr=C3=A2 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_AV= X)) 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 comple= tely disabled if CPU and target architecture do not support it?