public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/61146] New: wide-int error when building GCC with clang
@ 2014-05-11 18:47 olegendo at gcc dot gnu.org
  2014-05-11 18:54 ` [Bug other/61146] " pinskia at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: olegendo at gcc dot gnu.org @ 2014-05-11 18:47 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=61146

            Bug ID: 61146
           Summary: wide-int error when building GCC with clang
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: olegendo at gcc dot gnu.org

Created attachment 32776
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32776&action=edit
compressed build log

Building an SH cross GCC on OSX with clang results in the following errors:

../../gcc-trunk/gcc/wide-int.cc:1269:23: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (val[1], val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:505:24: note: expanded from macro
'umul_ppmm'
           : "=a" ((UDItype) (w0)),                                     \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1269:15: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (val[1], val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:506:24: note: expanded from macro
'umul_ppmm'
             "=d" ((UDItype) (w1))                                      \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1278:22: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (upper, val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:505:24: note: expanded from macro
'umul_ppmm'
           : "=a" ((UDItype) (w0)),                                     \
                              ^
../../gcc-trunk/gcc/wide-int.cc:1278:15: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
          umul_ppmm (upper, val[0], op1.ulow (), op2.ulow ());
          ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../gcc-trunk/gcc/../include/longlong.h:506:24: note: expanded from macro
'umul_ppmm'
             "=d" ((UDItype) (w1))

The full log is attached, which shows also other (spurious) warnings.

The problem can be worked around by setting
export CFLAGS="-fheinous-gnu-extensions"
export CXXFLAGS="-fheinous-gnu-extensions"
export CFLAGS_FOR_TARGET="-O2"
export CXXFLAGS_FOR_TARGET="-O2"

The *FLAGS_FOR_TARGET are required or else they will be set to *FLAGS, which
will pass -fheinous-gnu-extensions to the SH xgcc when building libgcc etc. (PR
25672)

The clang version on my OSX system:
clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix


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

end of thread, other threads:[~2014-05-28 20:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-11 18:47 [Bug other/61146] New: wide-int error when building GCC with clang olegendo at gcc dot gnu.org
2014-05-11 18:54 ` [Bug other/61146] " pinskia at gcc dot gnu.org
2014-05-11 19:37 ` pinskia at gcc dot gnu.org
2014-05-11 19:48 ` glisse at gcc dot gnu.org
2014-05-27 20:36 ` mrs at gcc dot gnu.org
2014-05-27 20:37 ` mrs at gcc dot gnu.org
2014-05-27 20:43 ` mrs at gcc dot gnu.org
2014-05-28 16:18 ` fxcoudert at gcc dot gnu.org
2014-05-28 17:00 ` mrs at gcc dot gnu.org
2014-05-28 17:06 ` dominiq at lps dot ens.fr
2014-05-28 18:40 ` howarth.at.gcc at gmail dot com
2014-05-28 18:50 ` dominiq at lps dot ens.fr
2014-05-28 18:52 ` mikestump at comcast dot net
2014-05-28 19:09 ` howarth.at.gcc at gmail dot com
2014-05-28 19:37 ` manu at gcc dot gnu.org
2014-05-28 20:02 ` mikestump at comcast dot net

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).