public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libitm/53113] New: Build fails in x86_avx.cc if AVX disabled but supported by as (Solaris & Linux)
@ 2012-04-25 12:26 windward at gmx dot com
  2012-06-08 15:22 ` [Bug libitm/53113] " safety0ff.bugz at gmail dot com
                   ` (27 more replies)
  0 siblings, 28 replies; 29+ messages in thread
From: windward at gmx dot com @ 2012-04-25 12:26 UTC (permalink / raw)
  To: gcc-bugs

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?


^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-01-23 12:36 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-25 12:26 [Bug libitm/53113] New: Build fails in x86_avx.cc if AVX disabled but supported by as (Solaris & Linux) windward at gmx dot com
2012-06-08 15:22 ` [Bug libitm/53113] " safety0ff.bugz at gmail dot com
2012-06-08 17:20 ` safety0ff.bugz at gmail dot com
2012-06-13 14:40 ` windward at gmx dot com
2012-06-21  9:25 ` windward at gmx dot com
2012-11-05  3:22 ` dirtyepic at gentoo dot org
2013-02-14 11:48 ` szarpaj at grubelek dot pl
2013-02-21 10:49 ` windward at gmx dot com
2013-02-21 21:23 ` jakub at gcc dot gnu.org
2013-02-22  2:31 ` dirtyepic at gentoo dot org
2013-02-26 14:18 ` windward at gmx dot com
2013-12-24 16:50 ` nheghathivhistha at gmail dot com
2013-12-24 16:54 ` nheghathivhistha at gmail dot com
2013-12-24 17:40 ` nheghathivhistha at gmail dot com
2013-12-25 16:14 ` hjl.tools at gmail dot com
2013-12-25 16:41 ` nheghathivhistha at gmail dot com
2013-12-25 16:46 ` hjl.tools at gmail dot com
2013-12-25 17:59 ` nheghathivhistha at gmail dot com
2013-12-25 18:05 ` hjl.tools at gmail dot com
2013-12-25 18:37 ` [Bug libitm/53113] Build fails in x86_avx.cc if AVX disabled by -mno-avx but supported by as hjl.tools at gmail dot com
2013-12-25 18:43 ` hjl.tools at gmail dot com
2013-12-25 19:50 ` dirtyepic at gentoo dot org
2013-12-25 20:42 ` hjl.tools at gmail dot com
2013-12-25 20:43 ` hjl.tools at gmail dot com
2013-12-25 20:43 ` hjl.tools at gmail dot com
2014-01-13 19:36 ` hjl at gcc dot gnu.org
2014-06-12 13:53 ` rguenth at gcc dot gnu.org
2015-01-23 12:27 ` torvald at gcc dot gnu.org
2015-01-23 12:36 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).