public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
@ 2011-07-06 14:37 ro at gcc dot gnu.org
2011-07-06 14:52 ` [Bug target/49660] " schwab@linux-m68k.org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2011-07-06 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
Summary: 64-bit gcc doesn't enable -mv8plus with -m32 on
Solaris/SPARC
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: ebotcazou@gcc.gnu.org
Host: sparcv9-sun-solaris2*
Target: sparcv9-sun-solaris2*
Build: sparcv9-sun-solaris2*
While testing my amd64-*-solaris2 patches in the sparcv9-sun-solaris2
configuration,
I noticed that all Go tests failed to link:
output is:
Undefined first referenced
symbol in file
__sync_bool_compare_and_swap_8
/var/gcc/gcc-4.7.0-20110628/11-gcc-v9/sparcv9-sun-solaris2.11/sparcv8plus/libgo/.libs/libgo.so
__sync_add_and_fetch_8
/var/gcc/gcc-4.7.0-20110628/11-gcc-v9/sparcv9-sun-solaris2.11/sparcv8plus/libgo/.libs/libgo.so
ld: fatal: symbol referencing errors. No output written to
/var/gcc/gcc-4.7.0-20110628/11-gcc-v9/gcc/testsuite/go/array-1.x
collect2: error: ld returned 1 exit status
The problem can be reduced to the following testcase:
#include <stdint.h>
extern int64_t *val, old, new;
int
cas64 (void)
{
return __sync_bool_compare_and_swap (val, old, new);
}
If compiled with a sparc-sun-solaris2.11 gcc
$ gcc -S sync.c
it contains no calls to __sync_bool_compare_and_swap_8.
If compiled with a sparcv9-sun-solaris2.11 gcc instead
$ gcc -m32 -S sync.c
it does have a call to that function. Comparing the -fverbose-asm output,
I see that the only difference in enabled options is that -mv8plus is
present in the first configuation, but missing in the second one. Indeed,
If I add -mv8plus to the second invocation, the call is gone.
Unfortunately, I don't have a good idea where best to fix this.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
@ 2011-07-06 14:52 ` schwab@linux-m68k.org
2011-07-06 15:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2011-07-06 14:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2011-07-06 14:52:04 UTC ---
I think you want to implement --with-cpu-(32|64) like x86 and powerpc.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
2011-07-06 14:52 ` [Bug target/49660] " schwab@linux-m68k.org
@ 2011-07-06 15:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-06 15:17 ` schwab@linux-m68k.org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-07-06 15:01 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #2 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-06 15:01:11 UTC ---
> --- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> 2011-07-06 14:52:04 UTC ---
> I think you want to implement --with-cpu-(32|64) like x86 and powerpc.
This might be a possible improvement, but this PR is just about
different defaults for no reason that I can see.
Rainer
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
2011-07-06 14:52 ` [Bug target/49660] " schwab@linux-m68k.org
2011-07-06 15:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-07-06 15:17 ` schwab@linux-m68k.org
2011-07-06 15:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: schwab@linux-m68k.org @ 2011-07-06 15:17 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2011-07-06 15:16:47 UTC ---
I think the proper handling of this is part of the --with-cpu-(32|64)
framework.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (2 preceding siblings ...)
2011-07-06 15:17 ` schwab@linux-m68k.org
@ 2011-07-06 15:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-06 15:34 ` ebotcazou at gcc dot gnu.org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-07-06 15:25 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-07-06 15:24:51 UTC ---
> --- Comment #3 from Andreas Schwab <schwab@linux-m68k.org> 2011-07-06 15:16:47 UTC ---
> I think the proper handling of this is part of the --with-cpu-(32|64)
> framework.
No idea, I just object to getting V8+ code with as 32-bit default
gcc, but non-V8+ with a 64-bit default gcc. This is just confusing and
unnecessary.
As I said: I'm uncertain about the proper place to handle this, thus
this PR Cc'ed to the target maintainer, Eric.
Rainer
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (3 preceding siblings ...)
2011-07-06 15:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-07-06 15:34 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:37 ` ebotcazou at gcc dot gnu.org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-06 15:34 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011.07.06 15:33:38
AssignedTo|unassigned at gcc dot |ebotcazou at gcc dot
|gnu.org |gnu.org
Ever Confirmed|0 |1
--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-06 15:33:38 UTC ---
Fixing.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (4 preceding siblings ...)
2011-07-06 15:34 ` ebotcazou at gcc dot gnu.org
@ 2011-07-07 20:37 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:41 ` ebotcazou at gcc dot gnu.org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-07 20:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #6 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-07 20:37:02 UTC ---
Author: ebotcazou
Date: Thu Jul 7 20:36:59 2011
New Revision: 176008
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176008
Log:
PR target/49660
* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Add
MASK_V8PLUS, remove commented out flag and reorder.
Added:
trunk/gcc/testsuite/gcc.target/sparc/cas64.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sparc/sol2.h
trunk/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (5 preceding siblings ...)
2011-07-07 20:37 ` ebotcazou at gcc dot gnu.org
@ 2011-07-07 20:41 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:44 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:46 ` ebotcazou at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-07 20:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #7 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-07 20:41:12 UTC ---
Author: ebotcazou
Date: Thu Jul 7 20:41:10 2011
New Revision: 176009
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176009
Log:
PR target/49660
* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Add
MASK_V8PLUS, remove commented out flag and reorder.
Backport from mainline
2011-06-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sparc/sol2-64.h (TARGET_DEFAULT): Remove.
(TARGET_64BIT_DEFAULT): Define.
* config.gcc (sparc*-*-solaris2*): Move sparc/sol2-64.h to front
of tm_file.
* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Define.
Added:
branches/gcc-4_6-branch/gcc/testsuite/gcc.target/sparc/cas64.c
- copied unchanged from r176008,
trunk/gcc/testsuite/gcc.target/sparc/cas64.c
Modified:
branches/gcc-4_6-branch/gcc/ChangeLog
branches/gcc-4_6-branch/gcc/config.gcc
branches/gcc-4_6-branch/gcc/config/sparc/sol2-64.h
branches/gcc-4_6-branch/gcc/config/sparc/sol2.h
branches/gcc-4_6-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (6 preceding siblings ...)
2011-07-07 20:41 ` ebotcazou at gcc dot gnu.org
@ 2011-07-07 20:44 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:46 ` ebotcazou at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-07 20:44 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
--- Comment #8 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-07 20:43:45 UTC ---
Author: ebotcazou
Date: Thu Jul 7 20:43:43 2011
New Revision: 176010
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=176010
Log:
PR target/49660
* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Add
MASK_V8PLUS, remove commented out flag and reorder.
Backport from mainline
2011-06-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sparc/sol2-64.h (TARGET_DEFAULT): Remove.
(TARGET_64BIT_DEFAULT): Define.
* config.gcc (sparc*-*-solaris2*): Move sparc/sol2-64.h to front
of tm_file.
* config/sparc/sol2.h [TARGET_64BIT_DEFAULT] (TARGET_DEFAULT): Define.
Added:
branches/gcc-4_5-branch/gcc/testsuite/gcc.target/sparc/cas64.c
- copied unchanged from r176009,
trunk/gcc/testsuite/gcc.target/sparc/cas64.c
Modified:
branches/gcc-4_5-branch/gcc/ChangeLog
branches/gcc-4_5-branch/gcc/config.gcc
branches/gcc-4_5-branch/gcc/config/sparc/sol2-64.h
branches/gcc-4_5-branch/gcc/config/sparc/sol2.h
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug target/49660] 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
` (7 preceding siblings ...)
2011-07-07 20:44 ` ebotcazou at gcc dot gnu.org
@ 2011-07-07 20:46 ` ebotcazou at gcc dot gnu.org
8 siblings, 0 replies; 10+ messages in thread
From: ebotcazou at gcc dot gnu.org @ 2011-07-07 20:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49660
Eric Botcazou <ebotcazou at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Version|4.7.0 |4.5.4
Resolution| |FIXED
--- Comment #9 from Eric Botcazou <ebotcazou at gcc dot gnu.org> 2011-07-07 20:46:36 UTC ---
Fixed in 4.5.x and above.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-07-07 20:46 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-06 14:37 [Bug target/49660] New: 64-bit gcc doesn't enable -mv8plus with -m32 on Solaris/SPARC ro at gcc dot gnu.org
2011-07-06 14:52 ` [Bug target/49660] " schwab@linux-m68k.org
2011-07-06 15:01 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-06 15:17 ` schwab@linux-m68k.org
2011-07-06 15:25 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-07-06 15:34 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:37 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:41 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:44 ` ebotcazou at gcc dot gnu.org
2011-07-07 20:46 ` ebotcazou at gcc dot gnu.org
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).