public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct
@ 2012-04-20 17:47 tim.mooney at ndsu dot edu
  2012-06-12 20:49 ` [Bug build/14003] " jan.kratochvil at redhat dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: tim.mooney at ndsu dot edu @ 2012-04-20 17:47 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14003

             Bug #: 14003
           Summary: build fails on solaris in infrun.c because of empty
                    inferior_suspend_state struct
           Product: gdb
           Version: 7.4
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
        AssignedTo: unassigned@sourceware.org
        ReportedBy: tim.mooney@ndsu.edu
    Classification: Unclassified


Attempting to build gdb-7.4 on x86_64-sun-solaris2.10 with the Sun/Oracle
Studio 12.3 compiler.  I've previously built gdb (7.0.1, 7.2, some earlier
versions) with the Studio toolchain.

I'm using

  CFLAGS='-Xa -g3 -features=extensions -xtarget=native -m64 -xarch=native'

The compile fails in infrun.c:

source='infrun.c' object='infrun.o' libtool=no DEPDIR=.deps
depmode=dashXmstdout
 /bin/bash ./../depcomp cc -Xa -g3 -features=extensions -xtarget=native -m64
-xa
rch=native -I/local/gnu/include -I/local/gnu/include -I/local/include   -I. -I. 
-I./common -I./config -DLOCALEDIR="\"/local/gnu/share/locale\"" -DHAVE_CONFIG_H 
-I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd
-
I./../include -I../libdecnumber -I./../libdecnumber  -I./gnulib -Ignulib  
-DTUI
=1  -I/local/gnu/include -I/local/gnu/include -I/local/include 
-I/usr/include/p
ython2.4 -I/usr/include/python2.4   -c -o infrun.o infrun.c
"inferior.h", line 401: warning: zero-sized struct/union
"inferior.h", line 401: warning: zero-sized struct/union
"infrun.c", line 6644: unknown operand size: op "="
"infrun.c", line 6668: unknown operand size: op "="
cc: acomp failed for infrun.c
gmake[2]: *** [infrun.o] Error 2
gmake[2]: *** Waiting for unfinished jobs....
gmake[2]: Leaving directory `/local/src/RPM/BUILD/gdb-7.4/gdb'


The problem is that "struct inferior_suspend_state" has no members, so the
compiler doesn't know the size for "suspend" in struct inferior, when it's
assigned to something else.

I worked around this issue by adding a "void * placeholder" member to struct
inferior_suspend_state, but it's not clear to me what point there is in having
a structure with no members.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug build/14003] build fails on solaris in infrun.c because of empty inferior_suspend_state struct
  2012-04-20 17:47 [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct tim.mooney at ndsu dot edu
@ 2012-06-12 20:49 ` jan.kratochvil at redhat dot com
  2012-06-13 18:15 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-06-12 20:49 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14003

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                 CC|                            |jan.kratochvil at redhat
                   |                            |dot com
         AssignedTo|unassigned at sourceware    |jan.kratochvil at redhat
                   |dot org                     |dot com

--- Comment #1 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-06-12 20:48:42 UTC ---
[patch] Fix Sun compiler compat. for empty structs (PR build/14003)
http://sourceware.org/ml/gdb-patches/2012-06/msg00370.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug build/14003] build fails on solaris in infrun.c because of empty inferior_suspend_state struct
  2012-04-20 17:47 [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct tim.mooney at ndsu dot edu
  2012-06-12 20:49 ` [Bug build/14003] " jan.kratochvil at redhat dot com
@ 2012-06-13 18:15 ` cvs-commit at gcc dot gnu.org
  2012-06-13 18:20 ` jan.kratochvil at redhat dot com
  2012-06-13 22:08 ` tim.mooney at ndsu dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2012-06-13 18:15 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14003

--- Comment #2 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> 2012-06-13 18:15:14 UTC ---
CVSROOT:    /cvs/src
Module name:    src
Changes by:    jkratoch@sourceware.org    2012-06-13 18:15:05

Modified files:
    gdb            : ChangeLog inferior.h infrun.c 

Log message:
    gdb/
    PR build/14003
    * inferior.h (struct inferior_suspend_state): Comment out.
    (struct inferior): Comment out the field suspend.
    * infrun.c (struct infcall_suspend_state): Comment out the field
    inferior_suspend.
    (save_infcall_suspend_state, restore_infcall_suspend_state): Comment
    out its assignment.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/ChangeLog.diff?cvsroot=src&r1=1.14358&r2=1.14359
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/inferior.h.diff?cvsroot=src&r1=1.176&r2=1.177
http://sourceware.org/cgi-bin/cvsweb.cgi/src/gdb/infrun.c.diff?cvsroot=src&r1=1.543&r2=1.544

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug build/14003] build fails on solaris in infrun.c because of empty inferior_suspend_state struct
  2012-04-20 17:47 [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct tim.mooney at ndsu dot edu
  2012-06-12 20:49 ` [Bug build/14003] " jan.kratochvil at redhat dot com
  2012-06-13 18:15 ` cvs-commit at gcc dot gnu.org
@ 2012-06-13 18:20 ` jan.kratochvil at redhat dot com
  2012-06-13 22:08 ` tim.mooney at ndsu dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: jan.kratochvil at redhat dot com @ 2012-06-13 18:20 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14003

Jan Kratochvil <jan.kratochvil at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Jan Kratochvil <jan.kratochvil at redhat dot com> 2012-06-13 18:19:53 UTC ---
FSF GDB CVS HEAD should work now, please test.
I failed to install Solaris Studio.
There will be no new 7.4.z release.
There is going to be 7.5 soon.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

* [Bug build/14003] build fails on solaris in infrun.c because of empty inferior_suspend_state struct
  2012-04-20 17:47 [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct tim.mooney at ndsu dot edu
                   ` (2 preceding siblings ...)
  2012-06-13 18:20 ` jan.kratochvil at redhat dot com
@ 2012-06-13 22:08 ` tim.mooney at ndsu dot edu
  3 siblings, 0 replies; 5+ messages in thread
From: tim.mooney at ndsu dot edu @ 2012-06-13 22:08 UTC (permalink / raw)
  To: gdb-prs

http://sourceware.org/bugzilla/show_bug.cgi?id=14003

--- Comment #4 from tim.mooney at ndsu dot edu 2012-06-13 22:08:04 UTC ---
I can confirm that this patch fixes the issue.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


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

end of thread, other threads:[~2012-06-13 22:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-20 17:47 [Bug build/14003] New: build fails on solaris in infrun.c because of empty inferior_suspend_state struct tim.mooney at ndsu dot edu
2012-06-12 20:49 ` [Bug build/14003] " jan.kratochvil at redhat dot com
2012-06-13 18:15 ` cvs-commit at gcc dot gnu.org
2012-06-13 18:20 ` jan.kratochvil at redhat dot com
2012-06-13 22:08 ` tim.mooney at ndsu dot edu

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