public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/29791] New: [13 regression] Many gdbsupport files don't compile on Solaris
@ 2022-11-16 14:41 ro at gcc dot gnu.org
  2022-11-16 14:42 ` [Bug build/29791] " ro at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-16 14:41 UTC (permalink / raw)
  To: gdb-prs

https://sourceware.org/bugzilla/show_bug.cgi?id=29791

            Bug ID: 29791
           Summary: [13 regression] Many gdbsupport files don't compile on
                    Solaris
           Product: gdb
           Version: HEAD
            Status: NEW
          Severity: normal
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: ro at gcc dot gnu.org
  Target Milestone: ---
              Host: *-*-solaris2.11
            Target: *-*-solaris2.11
             Build: *-*-solaris2.11

When trying to build current trunk on Solaris 11.4 (both SPARC and x86) with
the bundled GCC 12.2.0, a large part of gdbsupport failed to compile like this:

$ g++  -DHAVE_CONFIG_H -I. -I/vol/src/gnu/gdb/hg/master/dist/gdbsupport 
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../include
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../gdb -I../gnulib/import
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../gnulib/import -I..
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/..  -I../bfd
-I/vol/src/gnu/gdb/hg/master/dist/gdbsupport/../bfd   -Wall -Wpointer-arith
-Wno-unused -Wunused-value -Wunused-variable -Wunused-function -Wno-switch
-Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter
-Wunused-but-set-variable -Wno-sign-compare -Wno-error=maybe-uninitialized
-Wno-mismatched-tags -Wsuggest-override -Wimplicit-fallthrough=3
-Wduplicated-cond -Wshadow=local -Wdeprecated-copy -Wdeprecated-copy-dtor
-Wredundant-move -Wmissing-declarations -Wstrict-null-sentinel
-Wno-unknown-pragmas -Wno-deprecated-declarations -Werror -g -O2     -MT ptid.o
-MD -MP -MF .deps/ptid.Tpo -c -o ptid.o
/vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc
In file included from /usr/include/sys/time.h:448,
                 from ../gnulib/import/sys/time.h:39,
                 from /usr/include/sys/select.h:27,
                 from ../gnulib/import/sys/select.h:36,
                 from /usr/include/sys/types.h:665,
                 from ../gnulib/import/sys/types.h:39,
                 from ../gnulib/import/stdio.h:58,
                 from
/vol/src/gnu/gdb/hg/master/dist/gdbsupport/common-defs.h:86,
                 from /vol/src/gnu/gdb/hg/master/dist/gdbsupport/ptid.cc:20:
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate
../gnulib/config.h:1693:72: error: ‘malloc’ attribute argument 1 is ambiguous
 1693 | # define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f,
i)))
      |                                                                       
^
../gnulib/config.h:1693:72: note: use a cast to the expected type to
disambiguate

TBH, I don't have the slightest idea what this is supposed to mean, let alone
how to fix it.

It can be reproduced with the attached ptid.ii as

$ g++ -Wall -O2 -c -o ptid.o ptid.ii

To get further along, I'm currently using the attached hack to disable
_GL_ATTRIBUTE_DEALLOC on Solaris.
For the time being, I've

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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

end of thread, other threads:[~2022-11-26 14:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-16 14:41 [Bug build/29791] New: [13 regression] Many gdbsupport files don't compile on Solaris ro at gcc dot gnu.org
2022-11-16 14:42 ` [Bug build/29791] " ro at gcc dot gnu.org
2022-11-16 14:43 ` ro at gcc dot gnu.org
2022-11-16 14:44 ` ro at gcc dot gnu.org
2022-11-16 19:21 ` tromey at sourceware dot org
2022-11-17  9:55 ` cvs-commit at gcc dot gnu.org
2022-11-18 12:50 ` ro at gcc dot gnu.org
2022-11-18 13:10 ` ro at gcc dot gnu.org
2022-11-20 14:15 ` ro at gcc dot gnu.org
2022-11-26 14:09 ` brobecker at gnat 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).