public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug build/27536] New: aarch64-linux-hw-point.c fails to compile after updating to glibc-2.33
@ 2021-03-06 16:35 kevinb at redhat dot com
  2021-03-06 16:42 ` [Bug build/27536] " kevinb at redhat dot com
                   ` (18 more replies)
  0 siblings, 19 replies; 20+ messages in thread
From: kevinb at redhat dot com @ 2021-03-06 16:35 UTC (permalink / raw)
  To: gdb-prs

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

            Bug ID: 27536
           Summary: aarch64-linux-hw-point.c fails to compile after
                    updating to glibc-2.33
           Product: gdb
           Version: 10.1
            Status: NEW
          Severity: critical
          Priority: P2
         Component: build
          Assignee: unassigned at sourceware dot org
          Reporter: kevinb at redhat dot com
  Target Milestone: ---

GDB no longer builds on aarch64 (native build) after updating to glibc-2.33.

Due to a glibc 2.33 header file change, the file
nat/aarch64-linux-hw-point.c no longer builds on OSes using this version of
glibc.

An enum for PTRACE_SYSEMU is now provided by <sys/ptrace.h>.  In the
past, PTRACE_SYSEMU was defined only in <asm/ptrace.h>.  This is
what it looks like...

In <asm/ptrace.h>:

#define PTRACE_SYSEMU             31

In <sys/ptrace.h>:

enum __ptrace_request
{
  ...
  PTRACE_SYSEMU = 31,
#define PT_SYSEMU PTRACE_SYSEMU

  ...
}

When <asm/ptrace.h> and <sys/ptrace.h> are both included in a source
file, we run into the following build problem when the former is
included before the latter:

In file included from nat/aarch64-linux-hw-point.c:26:
/usr/include/sys/ptrace.h:86:3: error: expected identifier before numeric
constant
   86 |   PTRACE_SYSEMU = 31,
      |   ^~~~~~~~~~~~~

(There are more errors after this one too.)

The file builds without error when <asm/ptrace.h> is included after
<sys/ptrace.h>.  I found that this is already done in
nat/aarch64-sve-linux-ptrace.h (which is included by
nat/aarch64-linux-ptrace.c).

A commit for this bug is already on the trunk:

https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=665af52ec2a52184d39a76d6e724fa4733dbab3c

I'm creating this PR so that it may be backported to gdb-10-branch.

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

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

end of thread, other threads:[~2021-11-13 19:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-06 16:35 [Bug build/27536] New: aarch64-linux-hw-point.c fails to compile after updating to glibc-2.33 kevinb at redhat dot com
2021-03-06 16:42 ` [Bug build/27536] " kevinb at redhat dot com
2021-03-06 17:58 ` cvs-commit at gcc dot gnu.org
2021-03-07  4:43 ` brobecker at gnat dot com
2021-03-07  6:25 ` kevinb at redhat dot com
2021-06-27 17:45 ` ahmedsayeed1982 at yahoo dot com
2021-09-02 11:06 ` donipah907 at mtlcz dot com
2021-09-02 11:12 ` mark at klomp dot org
2021-09-05  7:34 ` kimolsun2020 at yahoo dot com
2021-09-06  9:08 ` focixujo at livinginsurance dot co.uk
2021-09-10 19:38 ` mehmetgelisin at aol dot com
2021-09-22 10:19 ` diheto5497 at secbuf dot com
2021-09-22 13:03 ` sam at gentoo dot org
2021-09-26 13:31 ` tes.vik1986 at gmail dot com
2021-10-09 11:01 ` gulsenenginar at aol dot com
2021-10-09 17:43 ` svitvitraga at gmail dot com
2021-10-18 19:57 ` ahmedsayeed1982 at hotmail dot com
2021-10-19  7:13 ` progonsaytu at gmail dot com
2021-10-24 10:01 ` glassmtech at ukr dot net
2021-11-13 19:34 ` tesaso8237 at funboxcn 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).