public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
@ 2012-03-17 20:33 matt at use dot net
  2012-03-17 21:09 ` [Bug target/52610] " mikpe at it dot uu.se
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: matt at use dot net @ 2012-03-17 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52610
           Summary: mpfr fails to compile when specifying CFLAGS="-O3
                    -mcpu=leon"
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: matt@use.net


error when compiling MPFR 3.1.0:
debian-sparc:~/src/mpfr-3.1.0# CFLAGS="-O3 -mcpu=leon -flto" CXXFLAGS="-O3
-mcpu=v8 -flto" LDFLAGS="-flto -O3 -mcpu=v8"  ./configure
--prefix=/opt/gcc-4.7.0 --with-gnu-as --with-gnu-ld --with-gmp=/opt/gcc-4.7.0
[...]
make
[...]
libtool: compile:  gcc -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_LOCALE_H=1 -DHAVE_WCHAR_H=1 -DHAVE_STDARG=1
-DHAVE_SYS_TIME_H=1 -DHAVE_ALLOCA_H=1 -DHAVE_STDINT_H=1 -DHAVE_VA_COPY=1
-DHAVE_SETLOCALE=1 -DHAVE_GETTIMEOFDAY=1 -DHAVE_LONG_LONG=1 -DHAVE_INTMAX_T=1
-DMPFR_HAVE_INTMAX_MAX=1 -DMPFR_HAVE_FESETROUND=1 -DHAVE_DENORMS=1
-DHAVE_FLOOR=1 -DHAVE_CEIL=1 -DMPFR_USE_THREAD_SAFE=1 -DLT_OBJDIR=\".libs/\"
-DHAVE_ATTRIBUTE_MODE=1 -DHAVE___GMPN_ROOTREM=1 -DHAVE___GMPN_SBPI1_DIVAPPR_Q=1
-I. -I/opt/gcc-4.7.0/include -O3 -mcpu=leon -flto -MT cmp.lo -MD -MP -MF
.deps/cmp.Tpo -c cmp.c  -fPIC -DPIC -o .libs/cmp.o
/tmp/ccjJFPW2.s: Assembler messages:
/tmp/ccjJFPW2.s:241: Error: Hardware capability "mul32" not enabled for "smul".
make[2]: *** [cmp.lo] Error 1

When I try to add -Av8 to CFLAGS, I get this error:
<command-line>:0:1: error: missing '(' after predicate

I have a qemu-sparc virtual machine based on Debian/Sarge I can provide that
reproduces the problem. I'll work on attaching a pre-processed example.


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
@ 2012-03-17 21:09 ` mikpe at it dot uu.se
  2012-03-18  8:16 ` ebotcazou at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: mikpe at it dot uu.se @ 2012-03-17 21:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Mikael Pettersson <mikpe at it dot uu.se> 2012-03-17 20:32:59 UTC ---
Are you using binutils-2.22 or newer with a host gcc built from some revision
earlier than r180966 (November 4 2011)?  If so then you're the victim of sparc
binutils issue <http://sourceware.org/bugzilla/show_bug.cgi?id=13441>

On sparc you have to update your host gcc to one that includes the PR50979 fix
before you can update binutils to 2.22 or newer.


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
  2012-03-17 21:09 ` [Bug target/52610] " mikpe at it dot uu.se
@ 2012-03-18  8:16 ` ebotcazou at gcc dot gnu.org
  2012-03-18  9:32 ` ebotcazou at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-03-18  8:16 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ebotcazou at gcc dot
                   |                            |gnu.org

--- Comment #2 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-03-18 08:13:53 UTC ---
> error when compiling MPFR 3.1.0:
> debian-sparc:~/src/mpfr-3.1.0# CFLAGS="-O3 -mcpu=leon -flto" CXXFLAGS="-O3
> -mcpu=v8 -flto" LDFLAGS="-flto -O3 -mcpu=v8"  ./configure
> --prefix=/opt/gcc-4.7.0 --with-gnu-as --with-gnu-ld --with-gmp=/opt/gcc-4.7.0

You have a strange mix of options -mcpu=leon/-mcpu=v8 here.

> When I try to add -Av8 to CFLAGS, I get this error:
> <command-line>:0:1: error: missing '(' after predicate

Sure, -Av8 is an assembler option, not a compiler option.

> I have a qemu-sparc virtual machine based on Debian/Sarge I can provide that
> reproduces the problem. I'll work on attaching a pre-processed example.

Try this:

Index: config/sparc/sparc.h
===================================================================
--- config/sparc/sparc.h        (revision 185503)
+++ config/sparc/sparc.h        (working copy)
@@ -328,6 +328,7 @@ extern enum cmodel sparc_cmodel;
 %{mcpu=sparclite:-Asparclite} \
 %{mcpu=sparclite86x:-Asparclite} \
 %{mcpu=f930:-Asparclite} %{mcpu=f934:-Asparclite} \
+%{mcpu=leon:-Av8} \
 %{mcpu=v8:-Av8} \
 %{mv8plus:-Av8plus} \
 %{mcpu=v9:-Av9} \


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
  2012-03-17 21:09 ` [Bug target/52610] " mikpe at it dot uu.se
  2012-03-18  8:16 ` ebotcazou at gcc dot gnu.org
@ 2012-03-18  9:32 ` ebotcazou at gcc dot gnu.org
  2012-03-24 18:48 ` ebotcazou at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-03-18  9:32 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2012-03-18
                 CC|ebotcazou at gcc dot        |
                   |gnu.org                     |
         AssignedTo|unassigned at gcc dot       |ebotcazou at gcc dot
                   |gnu.org                     |gnu.org
     Ever Confirmed|0                           |1


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
                   ` (2 preceding siblings ...)
  2012-03-18  9:32 ` ebotcazou at gcc dot gnu.org
@ 2012-03-24 18:48 ` ebotcazou at gcc dot gnu.org
  2012-03-24 18:50 ` ebotcazou at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-03-24 18:48 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-03-24 18:47:43 UTC ---
Author: ebotcazou
Date: Sat Mar 24 18:47:38 2012
New Revision: 185765

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185765
Log:
    PR target/52610
    * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=leon.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/sparc/sparc.h


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
                   ` (3 preceding siblings ...)
  2012-03-24 18:48 ` ebotcazou at gcc dot gnu.org
@ 2012-03-24 18:50 ` ebotcazou at gcc dot gnu.org
  2012-03-24 19:15 ` ebotcazou at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-03-24 18:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-03-24 18:48:00 UTC ---
Author: ebotcazou
Date: Sat Mar 24 18:47:55 2012
New Revision: 185766

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=185766
Log:
    PR target/52610
    * config/sparc/sparc.h (ASM_CPU_SPEC): Pass -Av8 if -mcpu=leon.

Modified:
    branches/gcc-4_7-branch/gcc/ChangeLog
    branches/gcc-4_7-branch/gcc/config/sparc/sparc.h


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
                   ` (4 preceding siblings ...)
  2012-03-24 18:50 ` ebotcazou at gcc dot gnu.org
@ 2012-03-24 19:15 ` ebotcazou at gcc dot gnu.org
  2012-03-24 20:59 ` matt at use dot net
  2012-04-23 15:21 ` matt at use dot net
  7 siblings, 0 replies; 9+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2012-03-24 19:15 UTC (permalink / raw)
  To: gcc-bugs

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

Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.1

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2012-03-24 18:49:38 UTC ---
In the next 4.7.x release.  Thanks for reporting the problem.


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
                   ` (5 preceding siblings ...)
  2012-03-24 19:15 ` ebotcazou at gcc dot gnu.org
@ 2012-03-24 20:59 ` matt at use dot net
  2012-04-23 15:21 ` matt at use dot net
  7 siblings, 0 replies; 9+ messages in thread
From: matt at use dot net @ 2012-03-24 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Matt Hargett <matt at use dot net> 2012-03-24 20:20:42 UTC ---
Great. I verified the fix yesterday. Thanks!


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

* [Bug target/52610] mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon"
  2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
                   ` (6 preceding siblings ...)
  2012-03-24 20:59 ` matt at use dot net
@ 2012-04-23 15:21 ` matt at use dot net
  7 siblings, 0 replies; 9+ messages in thread
From: matt at use dot net @ 2012-04-23 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

Matt Hargett <matt at use dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |VERIFIED

--- Comment #7 from Matt Hargett <matt at use dot net> 2012-04-23 15:21:19 UTC ---
Verified again with 4.7 trunk.


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

end of thread, other threads:[~2012-04-23 15:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-17 20:33 [Bug target/52610] New: mpfr fails to compile when specifying CFLAGS="-O3 -mcpu=leon" matt at use dot net
2012-03-17 21:09 ` [Bug target/52610] " mikpe at it dot uu.se
2012-03-18  8:16 ` ebotcazou at gcc dot gnu.org
2012-03-18  9:32 ` ebotcazou at gcc dot gnu.org
2012-03-24 18:48 ` ebotcazou at gcc dot gnu.org
2012-03-24 18:50 ` ebotcazou at gcc dot gnu.org
2012-03-24 19:15 ` ebotcazou at gcc dot gnu.org
2012-03-24 20:59 ` matt at use dot net
2012-04-23 15:21 ` matt at use 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).