package/gdb: fix gdbserver build for m68k
authorRomain Naour <romain.naour@gmail.com>
Fri, 22 Jun 2018 21:09:49 +0000 (23:09 +0200)
committerPeter Korsgaard <peter@korsgaard.com>
Sat, 23 Jun 2018 10:52:01 +0000 (12:52 +0200)
commit8646a7fae998132cf468454be8b762211713d5ca
tree0e7e45f7782c522345f45a5e112e2a85f5a21323
parentdff052827e41b63f3bf287cf44f1185f2b6c139e
package/gdb: fix gdbserver build for m68k

As for strace [1], when <sys/reg.h> is included after <linux/ptrace.h>,
the build fails on m68k with the following diagnostics:

In file included from ./../nat/linux-ptrace.h:28:0,
                 from linux-low.h:27,
                 from linux-m68k-low.c:20:
[...]/usr/include/sys/reg.h:26:3: error: expected identifier before numeric constant
   PT_D1 = 0,
   ^
[...]usr/include/sys/reg.h:26:3: error: expected « } » before numeric constant
[...]usr/include/sys/reg.h:26:3: error: expected unqualified-id before numeric constant
In file included from linux-m68k-low.c:27:0:
[...]usr/include/sys/reg.h:99:1: error: expected declaration before « } » token
 };
 ^

Fix this by moving <sys/reg.h> on top of "linux-low.h".

Fixes:
https://gitlab.com/free-electrons/toolchains-builder/-/jobs/72006385

[1] https://github.com/strace/strace/commit/6ebf6c4f9e5ebca123a5b5f24afe67cf0473cf92

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Cc: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/gdb/7.12.1/0007-gdbserver-fix-build-for-m68k.patch [new file with mode: 0644]
package/gdb/8.0.1/0005-gdbserver-fix-build-for-m68k.patch [new file with mode: 0644]