aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/include/m68k-linux-gnu
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/include/m68k-linux-gnu')
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/a.out.h3
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/endianness.h11
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/fcntl.h54
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/fenv.h131
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h25
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/fp-logb.h24
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/iscanonical.h54
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/link.h57
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/long-double.h21
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/poll.h49
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/procfs-id.h25
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/procfs.h34
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h37
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/semaphore.h35
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/setjmp.h46
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/sockaddr.h42
-rw-r--r--lib/libc/include/m68k-linux-gnu/bits/struct_stat.h127
-rw-r--r--lib/libc/include/m68k-linux-gnu/fpu_control.h118
-rw-r--r--lib/libc/include/m68k-linux-gnu/gnu/lib-names.h31
-rw-r--r--lib/libc/include/m68k-linux-gnu/gnu/stubs.h16
-rw-r--r--lib/libc/include/m68k-linux-gnu/sys/reg.h101
-rw-r--r--lib/libc/include/m68k-linux-gnu/sys/ucontext.h130
-rw-r--r--lib/libc/include/m68k-linux-gnu/sys/user.h65
23 files changed, 1236 insertions, 0 deletions
diff --git a/lib/libc/include/m68k-linux-gnu/bits/a.out.h b/lib/libc/include/m68k-linux-gnu/bits/a.out.h
new file mode 100644
index 0000000000..398f4c27a3
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/a.out.h
@@ -0,0 +1,3 @@
+#ifndef __A_OUT_GNU_H__
+# error "Never use <bits/a.out.h> directly; include <a.out.h> instead."
+#endif \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/endianness.h b/lib/libc/include/m68k-linux-gnu/bits/endianness.h
new file mode 100644
index 0000000000..f0dc4ef152
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/endianness.h
@@ -0,0 +1,11 @@
+#ifndef _BITS_ENDIANNESS_H
+#define _BITS_ENDIANNESS_H 1
+
+#ifndef _BITS_ENDIAN_H
+# error "Never use <bits/endianness.h> directly; include <endian.h> instead."
+#endif
+
+/* m68k is big-endian. */
+#define __BYTE_ORDER __BIG_ENDIAN
+
+#endif /* bits/endianness.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fcntl.h b/lib/libc/include/m68k-linux-gnu/bits/fcntl.h
new file mode 100644
index 0000000000..f4f6d57c1c
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/fcntl.h
@@ -0,0 +1,54 @@
+/* O_*, F_*, FD_* bit values for Linux.
+ Copyright (C) 2000-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FCNTL_H
+# error "Never use <bits/fcntl.h> directly; include <fcntl.h> instead."
+#endif
+
+#define __O_DIRECTORY 040000 /* Must be a directory. */
+#define __O_NOFOLLOW 0100000 /* Do not follow links. */
+#define __O_DIRECT 0200000 /* Direct disk access. */
+#define __O_LARGEFILE 0400000
+
+struct flock
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+#ifndef __USE_FILE_OFFSET64
+ __off_t l_start; /* Offset where the lock begins. */
+ __off_t l_len; /* Size of the locked area; zero means until EOF. */
+#else
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+#endif
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+
+#ifdef __USE_LARGEFILE64
+struct flock64
+ {
+ short int l_type; /* Type of lock: F_RDLCK, F_WRLCK, or F_UNLCK. */
+ short int l_whence; /* Where `l_start' is relative to (like `lseek'). */
+ __off64_t l_start; /* Offset where the lock begins. */
+ __off64_t l_len; /* Size of the locked area; zero means until EOF. */
+ __pid_t l_pid; /* Process holding the lock. */
+ };
+#endif
+
+/* Include generic Linux declarations. */
+#include <bits/fcntl-linux.h> \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fenv.h b/lib/libc/include/m68k-linux-gnu/bits/fenv.h
new file mode 100644
index 0000000000..1bd8601ce1
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/fenv.h
@@ -0,0 +1,131 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FENV_H
+# error "Never use <bits/fenv.h> directly; include <fenv.h> instead."
+#endif
+
+
+#if defined __HAVE_68881__ || defined __HAVE_FPU__ || defined __mcffpu__
+
+/* Define bits representing the exception. We use the bit positions of
+ the appropriate bits in the FPSR Accrued Exception Byte. */
+enum
+ {
+ FE_INEXACT =
+# define FE_INEXACT (1 << 3)
+ FE_INEXACT,
+ FE_DIVBYZERO =
+# define FE_DIVBYZERO (1 << 4)
+ FE_DIVBYZERO,
+ FE_UNDERFLOW =
+# define FE_UNDERFLOW (1 << 5)
+ FE_UNDERFLOW,
+ FE_OVERFLOW =
+# define FE_OVERFLOW (1 << 6)
+ FE_OVERFLOW,
+ FE_INVALID =
+# define FE_INVALID (1 << 7)
+ FE_INVALID
+ };
+
+# define FE_ALL_EXCEPT \
+ (FE_INEXACT | FE_DIVBYZERO | FE_UNDERFLOW | FE_OVERFLOW | FE_INVALID)
+
+/* The m68k FPU supports all of the four defined rounding modes. We use
+ the bit positions in the FPCR Mode Control Byte as the values for the
+ appropriate macros. */
+enum
+ {
+ FE_TONEAREST =
+# define FE_TONEAREST 0
+ FE_TONEAREST,
+ FE_TOWARDZERO =
+# define FE_TOWARDZERO (1 << 4)
+ FE_TOWARDZERO,
+ FE_DOWNWARD =
+# define FE_DOWNWARD (2 << 4)
+ FE_DOWNWARD,
+ FE_UPWARD =
+# define FE_UPWARD (3 << 4)
+ FE_UPWARD
+ };
+
+#else
+
+/* In the soft-float case, only rounding to nearest is supported, with
+ no exceptions. */
+
+# define FE_ALL_EXCEPT 0
+
+enum
+ {
+ __FE_UNDEFINED = -1,
+
+ FE_TONEAREST =
+# define FE_TONEAREST 0
+ FE_TONEAREST
+ };
+
+#endif
+
+
+/* Type representing exception flags. */
+typedef unsigned int fexcept_t;
+
+
+#if defined __HAVE_68881__ || defined __HAVE_FPU__ || defined __mcffpu__
+
+/* Type representing floating-point environment. This structure
+ corresponds to the layout of the block written by `fmovem'. */
+typedef struct
+ {
+ unsigned int __control_register;
+ unsigned int __status_register;
+ unsigned int __instruction_address;
+ }
+fenv_t;
+
+#else
+
+/* Keep ABI compatibility with the type used in the generic
+ bits/fenv.h, formerly used for no-FPU ColdFire. */
+typedef struct
+ {
+ fexcept_t __excepts;
+ }
+fenv_t;
+
+#endif
+
+/* If the default argument is used we use this value. */
+#define FE_DFL_ENV ((const fenv_t *) -1)
+
+#if defined __USE_GNU && (defined __HAVE_68881__ \
+ || defined __HAVE_FPU__ \
+ || defined __mcffpu__)
+/* Floating-point environment where none of the exceptions are masked. */
+# define FE_NOMASK_ENV ((const fenv_t *) -2)
+#endif
+
+#if __GLIBC_USE (IEC_60559_BFP_EXT_C2X)
+/* Type representing floating-point control modes. */
+typedef unsigned int femode_t;
+
+/* Default floating-point control modes. */
+# define FE_DFL_MODE ((const femode_t *) -1L)
+#endif \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h b/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h
new file mode 100644
index 0000000000..33644b4dcc
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/flt-eval-method.h
@@ -0,0 +1,25 @@
+/* Define __GLIBC_FLT_EVAL_METHOD. M68K version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/flt-eval-method.h> directly; include <math.h> instead."
+#endif
+
+/* The m68k FPUs evaluate all values in the 96-bit floating-point
+ format which is also available for the user as 'long double'. */
+#define __GLIBC_FLT_EVAL_METHOD 2 \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h b/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h
new file mode 100644
index 0000000000..1f184bd5db
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/fp-logb.h
@@ -0,0 +1,24 @@
+/* Define __FP_LOGB0_IS_MIN and __FP_LOGBNAN_IS_MIN. M68K version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/fp-logb.h> directly; include <math.h> instead."
+#endif
+
+#define __FP_LOGB0_IS_MIN 1
+#define __FP_LOGBNAN_IS_MIN 0 \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h b/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h
new file mode 100644
index 0000000000..8e6c0d05f5
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/iscanonical.h
@@ -0,0 +1,54 @@
+/* Define iscanonical macro. ldbl-96 version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _MATH_H
+# error "Never use <bits/iscanonical.h> directly; include <math.h> instead."
+#endif
+
+extern int __iscanonicall (long double __x)
+ __THROW __attribute__ ((__const__));
+#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
+#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
+#if __HAVE_DISTINCT_FLOAT128
+# define __iscanonicalf128(x) ((void) (__typeof (x)) (x), 1)
+#endif
+
+/* Return nonzero value if X is canonical. In IEEE interchange binary
+ formats, all values are canonical, but the argument must still be
+ converted to its semantic type for any exceptions arising from the
+ conversion, before being discarded; in extended precision, there
+ are encodings that are not consistently handled as corresponding to
+ any particular value of the type, and we return 0 for those. */
+#ifndef __cplusplus
+# define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
+#else
+/* In C++ mode, __MATH_TG cannot be used, because it relies on
+ __builtin_types_compatible_p, which is a C-only builtin. On the
+ other hand, overloading provides the means to distinguish between
+ the floating-point types. The overloading resolution will match
+ the correct parameter (regardless of type qualifiers (i.e.: const
+ and volatile)). */
+extern "C++" {
+inline int iscanonical (float __val) { return __iscanonicalf (__val); }
+inline int iscanonical (double __val) { return __iscanonical (__val); }
+inline int iscanonical (long double __val) { return __iscanonicall (__val); }
+# if __HAVE_DISTINCT_FLOAT128
+inline int iscanonical (_Float128 __val) { return __iscanonicalf128 (__val); }
+# endif
+}
+#endif /* __cplusplus */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/link.h b/lib/libc/include/m68k-linux-gnu/bits/link.h
new file mode 100644
index 0000000000..55d203f370
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/link.h
@@ -0,0 +1,57 @@
+/* Copyright (C) 2005-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _LINK_H
+# error "Never include <bits/link.h> directly; use <link.h> instead."
+#endif
+
+
+/* Registers for entry into PLT on M68K. */
+typedef struct La_m68k_regs
+{
+ uint32_t lr_a0;
+ uint32_t lr_a1;
+ uint32_t lr_sp;
+} La_m68k_regs;
+
+/* Return values for calls from PLT on M68K. */
+typedef struct La_m68k_retval
+{
+ uint32_t lrv_d0;
+ uint32_t lrv_d1;
+ uint32_t lrv_a0;
+ long double lrv_fp0;
+} La_m68k_retval;
+
+
+__BEGIN_DECLS
+
+extern Elf32_Addr la_m68k_gnu_pltenter (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ La_m68k_regs *__regs,
+ unsigned int *__flags,
+ const char *__symname,
+ long int *__framesizep);
+extern unsigned int la_m68k_gnu_pltexit (Elf32_Sym *__sym, unsigned int __ndx,
+ uintptr_t *__refcook,
+ uintptr_t *__defcook,
+ const La_m68k_regs *__inregs,
+ La_m68k_retval *__outregs,
+ const char *__symname);
+
+__END_DECLS \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/long-double.h b/lib/libc/include/m68k-linux-gnu/bits/long-double.h
new file mode 100644
index 0000000000..ef3832bc80
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/long-double.h
@@ -0,0 +1,21 @@
+/* Properties of long double type. ldbl-96 version.
+ Copyright (C) 2016-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* long double is distinct from double, so there is nothing to
+ define here. */
+#define __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI 0 \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/poll.h b/lib/libc/include/m68k-linux-gnu/bits/poll.h
new file mode 100644
index 0000000000..fd12b70920
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/poll.h
@@ -0,0 +1,49 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_POLL_H
+# error "Never use <bits/poll.h> directly; include <sys/poll.h> instead."
+#endif
+
+/* Event types that can be polled for. These bits may be set in `events'
+ to indicate the interesting event types; they will appear in `revents'
+ to indicate the status of the file descriptor. */
+#define POLLIN 0x001 /* There is data to read. */
+#define POLLPRI 0x002 /* There is urgent data to read. */
+#define POLLOUT 0x004 /* Writing now will not block. */
+
+#if defined __USE_XOPEN || defined __USE_XOPEN2K8
+/* These values are defined in XPG4.2. */
+# define POLLRDNORM 0x040 /* Normal data may be read. */
+# define POLLRDBAND 0x080 /* Priority data may be read. */
+# define POLLWRNORM POLLOUT /* Writing now will not block. */
+# define POLLWRBAND 0x100 /* Priority data may be written. */
+#endif
+
+#ifdef __USE_GNU
+/* These are extensions for Linux. */
+# define POLLMSG 0x400
+# define POLLREMOVE 0x1000
+# define POLLRDHUP 0x2000
+#endif
+
+/* Event types always implicitly polled for. These bits need not be set in
+ `events', but they will appear in `revents' to indicate the status of
+ the file descriptor. */
+#define POLLERR 0x008 /* Error condition. */
+#define POLLHUP 0x010 /* Hung up. */
+#define POLLNVAL 0x020 /* Invalid polling request. */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h b/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h
new file mode 100644
index 0000000000..9ac1a07e15
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/procfs-id.h
@@ -0,0 +1,25 @@
+/* Types of pr_uid and pr_gid in struct elf_prpsinfo. M68K version.
+ Copyright (C) 2018-2021 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs-id.h> directly; use <sys/procfs.h> instead."
+#endif
+
+typedef unsigned short int __pr_uid_t;
+typedef unsigned short int __pr_gid_t; \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/procfs.h b/lib/libc/include/m68k-linux-gnu/bits/procfs.h
new file mode 100644
index 0000000000..65a067f77c
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/procfs.h
@@ -0,0 +1,34 @@
+/* Types for registers for sys/procfs.h. M68K version.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_PROCFS_H
+# error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
+#endif
+
+/* Type for a general-purpose register. */
+typedef unsigned long elf_greg_t;
+
+/* And the whole bunch of them. We could have used `struct
+ user_regs_struct' directly in the typedef, but tradition says that
+ the register set is an array, which does have some peculiar
+ semantics, so leave it that way. */
+#define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+/* Register set for the floating-point registers. */
+typedef struct user_m68kfp_struct elf_fpregset_t; \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h b/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h
new file mode 100644
index 0000000000..262ca65c83
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/pthreadtypes-arch.h
@@ -0,0 +1,37 @@
+/* Copyright (C) 2010-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_PTHREADTYPES_ARCH_H
+#define _BITS_PTHREADTYPES_ARCH_H 1
+
+#include <bits/endian.h>
+
+#define __SIZEOF_PTHREAD_ATTR_T 36
+#define __SIZEOF_PTHREAD_MUTEX_T 24
+#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
+#define __SIZEOF_PTHREAD_COND_T 48
+#define __SIZEOF_PTHREAD_CONDATTR_T 4
+#define __SIZEOF_PTHREAD_RWLOCK_T 32
+#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
+#define __SIZEOF_PTHREAD_BARRIER_T 20
+#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
+
+#define __LOCK_ALIGNMENT __attribute__ ((__aligned__ (4)))
+#define __ONCE_ALIGNMENT __attribute__ ((__aligned__ (4)))
+
+#endif /* bits/pthreadtypes.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/semaphore.h b/lib/libc/include/m68k-linux-gnu/bits/semaphore.h
new file mode 100644
index 0000000000..d0ef954dd3
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/semaphore.h
@@ -0,0 +1,35 @@
+/* Copyright (C) 2010-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Maxim Kuvyrkov <maxim@codesourcery.com>, 2010.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SEMAPHORE_H
+# error "Never use <bits/semaphore.h> directly; include <semaphore.h> instead."
+#endif
+
+
+#define __SIZEOF_SEM_T 16
+
+
+/* Value returned if `sem_open' failed. */
+#define SEM_FAILED ((sem_t *) 0)
+
+
+typedef union
+{
+ char __size[__SIZEOF_SEM_T];
+ long int __align __attribute__ ((__aligned__ (4)));
+} sem_t; \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/setjmp.h b/lib/libc/include/m68k-linux-gnu/bits/setjmp.h
new file mode 100644
index 0000000000..3cd6dc3e6e
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/setjmp.h
@@ -0,0 +1,46 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* Define the machine-dependent type `jmp_buf'. m68k version. */
+#ifndef _BITS_SETJMP_H
+#define _BITS_SETJMP_H 1
+
+#if !defined _SETJMP_H && !defined _PTHREAD_H
+# error "Never include <bits/setjmp.h> directly; use <setjmp.h> instead."
+#endif
+
+typedef struct __jmp_buf_internal_tag
+ {
+ /* There are eight 4-byte data registers, but D0 is not saved. */
+ long int __dregs[7];
+
+ /* There are six 4-byte address registers, plus the FP and SP. */
+ int *__aregs[6];
+ int *__fp;
+ int *__sp;
+
+#if defined __HAVE_68881__ || defined __HAVE_FPU__
+ /* There are eight floating point registers which
+ are saved in IEEE 96-bit extended format. */
+ char __fpregs[8 * (96 / 8)];
+#elif defined __mcffpu__
+ char __fpregs[8 * (64 / 8)];
+#endif
+
+ } __jmp_buf[1];
+
+#endif /* bits/setjmp.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h b/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h
new file mode 100644
index 0000000000..fe1093bd0d
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/sockaddr.h
@@ -0,0 +1,42 @@
+/* Definition of struct sockaddr_* members and sizes, Linux/m68k version.
+ Copyright (C) 1995-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+/*
+ * Never include this file directly; use <sys/socket.h> instead.
+ */
+
+#ifndef _BITS_SOCKADDR_H
+#define _BITS_SOCKADDR_H 1
+
+
+/* POSIX.1g specifies this type name for the `sa_family' member. */
+typedef unsigned short int sa_family_t;
+
+/* This macro is used to declare the initial common members
+ of the data types used for socket addresses, `struct sockaddr',
+ `struct sockaddr_in', `struct sockaddr_un', etc. */
+
+#define __SOCKADDR_COMMON(sa_prefix) \
+ sa_family_t sa_prefix##family
+
+#define __SOCKADDR_COMMON_SIZE (sizeof (unsigned short int))
+
+/* Size of struct sockaddr_storage. */
+#define _SS_SIZE 126
+
+#endif /* bits/sockaddr.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
new file mode 100644
index 0000000000..e85f20f65c
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/bits/struct_stat.h
@@ -0,0 +1,127 @@
+/* Definition for struct stat.
+ Copyright (C) 2020-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#if !defined _SYS_STAT_H && !defined _FCNTL_H
+# error "Never include <bits/struct_stat.h> directly; use <sys/stat.h> instead."
+#endif
+
+#ifndef _BITS_STRUCT_STAT_H
+#define _BITS_STRUCT_STAT_H 1
+
+struct stat
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+#ifndef __USE_FILE_OFFSET64
+ __ino_t st_ino; /* File serial number. */
+#else
+ __ino_t __st_ino; /* 32bit file serial number. */
+#endif
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+#ifndef __USE_FILE_OFFSET64
+ __off_t st_size; /* Size of file, in bytes. */
+#else
+ __off64_t st_size; /* Size of file, in bytes. */
+#endif
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+#ifndef __USE_FILE_OFFSET64
+ __blkcnt_t st_blocks; /* Number 512-byte blocks allocated. */
+#else
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+#endif
+#ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# define st_atime st_atim.tv_sec /* Backward compatibility. */
+# define st_mtime st_mtim.tv_sec
+# define st_ctime st_ctim.tv_sec
+#else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+#endif
+#ifndef __USE_FILE_OFFSET64
+ unsigned long int __glibc_reserved4;
+ unsigned long int __glibc_reserved5;
+#else
+ __ino64_t st_ino; /* File serial number. */
+#endif
+ };
+
+#ifdef __USE_LARGEFILE64
+struct stat64
+ {
+ __dev_t st_dev; /* Device. */
+ unsigned short int __pad1;
+
+ __ino_t __st_ino; /* 32bit file serial number. */
+ __mode_t st_mode; /* File mode. */
+ __nlink_t st_nlink; /* Link count. */
+ __uid_t st_uid; /* User ID of the file's owner. */
+ __gid_t st_gid; /* Group ID of the file's group.*/
+ __dev_t st_rdev; /* Device number, if device. */
+ unsigned short int __pad2;
+ __off64_t st_size; /* Size of file, in bytes. */
+ __blksize_t st_blksize; /* Optimal block size for I/O. */
+
+ __blkcnt64_t st_blocks; /* Number 512-byte blocks allocated. */
+# ifdef __USE_XOPEN2K8
+ /* Nanosecond resolution timestamps are stored in a format
+ equivalent to 'struct timespec'. This is the type used
+ whenever possible but the Unix namespace rules do not allow the
+ identifier 'timespec' to appear in the <sys/stat.h> header.
+ Therefore we have to handle the use of this header in strictly
+ standard-compliant sources special. */
+ struct timespec st_atim; /* Time of last access. */
+ struct timespec st_mtim; /* Time of last modification. */
+ struct timespec st_ctim; /* Time of last status change. */
+# else
+ __time_t st_atime; /* Time of last access. */
+ unsigned long int st_atimensec; /* Nscecs of last access. */
+ __time_t st_mtime; /* Time of last modification. */
+ unsigned long int st_mtimensec; /* Nsecs of last modification. */
+ __time_t st_ctime; /* Time of last status change. */
+ unsigned long int st_ctimensec; /* Nsecs of last status change. */
+# endif
+ __ino64_t st_ino; /* File serial number. */
+ };
+#endif
+
+/* Tell code we have these members. */
+#define _STATBUF_ST_BLKSIZE
+#define _STATBUF_ST_RDEV
+/* Nanosecond resolution time values are supported. */
+#define _STATBUF_ST_NSEC
+
+#endif /* _BITS_STRUCT_STAT_H */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/fpu_control.h b/lib/libc/include/m68k-linux-gnu/fpu_control.h
new file mode 100644
index 0000000000..70ed49f091
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/fpu_control.h
@@ -0,0 +1,118 @@
+/* 68k FPU control word definitions.
+ Copyright (C) 1996-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _FPU_CONTROL_H
+#define _FPU_CONTROL_H
+
+/*
+ * Motorola floating point control register bits.
+ *
+ * 31-16 -> reserved (read as 0, ignored on write)
+ * 15 -> enable trap for BSUN exception
+ * 14 -> enable trap for SNAN exception
+ * 13 -> enable trap for OPERR exception
+ * 12 -> enable trap for OVFL exception
+ * 11 -> enable trap for UNFL exception
+ * 10 -> enable trap for DZ exception
+ * 9 -> enable trap for INEX2 exception (INEX on Coldfire)
+ * 8 -> enable trap for INEX1 exception (IDE on Coldfire)
+ * 7-6 -> Precision Control (only bit 6 is used on Coldfire)
+ * 5-4 -> Rounding Control
+ * 3-0 -> zero (read as 0, write as 0)
+ *
+ *
+ * Precision Control:
+ * 00 - round to extended precision
+ * 01 - round to single precision
+ * 10 - round to double precision
+ * 11 - undefined
+ *
+ * Rounding Control:
+ * 00 - rounding to nearest (RN)
+ * 01 - rounding toward zero (RZ)
+ * 10 - rounding (down)toward minus infinity (RM)
+ * 11 - rounding (up) toward plus infinity (RP)
+ *
+ * The hardware default is 0x0000. I choose 0x5400.
+ */
+
+#include <features.h>
+
+#if defined (__mcoldfire__) && !defined (__mcffpu__)
+
+# define _FPU_RESERVED 0xffffffff
+# define _FPU_DEFAULT 0x00000000
+# define _FPU_GETCW(cw) ((cw) = 0)
+# define _FPU_SETCW(cw) ((void) (cw))
+
+#else
+
+/* masking of interrupts */
+# define _FPU_MASK_BSUN 0x8000
+# define _FPU_MASK_SNAN 0x4000
+# define _FPU_MASK_OPERR 0x2000
+# define _FPU_MASK_OVFL 0x1000
+# define _FPU_MASK_UNFL 0x0800
+# define _FPU_MASK_DZ 0x0400
+# define _FPU_MASK_INEX1 0x0200
+# define _FPU_MASK_INEX2 0x0100
+
+/* precision control */
+# ifdef __mcoldfire__
+# define _FPU_DOUBLE 0x00
+# else
+# define _FPU_EXTENDED 0x00 /* RECOMMENDED */
+# define _FPU_DOUBLE 0x80
+# endif
+# define _FPU_SINGLE 0x40 /* DO NOT USE */
+
+/* rounding control */
+# define _FPU_RC_NEAREST 0x00 /* RECOMMENDED */
+# define _FPU_RC_ZERO 0x10
+# define _FPU_RC_DOWN 0x20
+# define _FPU_RC_UP 0x30
+
+# ifdef __mcoldfire__
+# define _FPU_RESERVED 0xFFFF800F
+# else
+# define _FPU_RESERVED 0xFFFF000F /* Reserved bits in fpucr */
+# endif
+
+
+/* Now two recommended fpucr */
+
+/* The fdlibm code requires no interrupts for exceptions. Don't
+ change the rounding mode, it would break long double I/O! */
+# define _FPU_DEFAULT 0x00000000
+
+/* IEEE: same as above, but exceptions. We must make it non-zero so
+ that __setfpucw works. This bit will be ignored. */
+# define _FPU_IEEE 0x00000001
+
+/* Macros for accessing the hardware control word. */
+# define _FPU_GETCW(cw) __asm__ ("fmove%.l %!, %0" : "=dm" (cw))
+# define _FPU_SETCW(cw) __asm__ volatile ("fmove%.l %0, %!" : : "dm" (cw))
+#endif
+
+/* Type of the control word. */
+typedef unsigned int fpu_control_t __attribute__ ((__mode__ (__SI__)));
+
+/* Default control word set at startup. */
+extern fpu_control_t __fpu_control;
+
+#endif /* _M68K_FPU_CONTROL_H */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h b/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
new file mode 100644
index 0000000000..8d51e1156c
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/gnu/lib-names.h
@@ -0,0 +1,31 @@
+/* This file is automatically generated.
+ It defines macros to allow user program to find the shared
+ library files which come as part of GNU libc. */
+#ifndef __GNU_LIB_NAMES_H
+#define __GNU_LIB_NAMES_H 1
+
+#define LD_SO "ld.so.1"
+#define LIBANL_SO "libanl.so.1"
+#define LIBBROKENLOCALE_SO "libBrokenLocale.so.1"
+#define LIBCRYPT_SO "libcrypt.so.1"
+#define LIBC_SO "libc.so.6"
+#define LIBDL_SO "libdl.so.2"
+#define LIBGCC_S_SO "libgcc_s.so.2"
+#define LIBMVEC_SO "libmvec.so.1"
+#define LIBM_SO "libm.so.6"
+#define LIBNSL_SO "libnsl.so.1"
+#define LIBNSS_COMPAT_SO "libnss_compat.so.2"
+#define LIBNSS_DB_SO "libnss_db.so.2"
+#define LIBNSS_DNS_SO "libnss_dns.so.2"
+#define LIBNSS_FILES_SO "libnss_files.so.2"
+#define LIBNSS_HESIOD_SO "libnss_hesiod.so.2"
+#define LIBNSS_LDAP_SO "libnss_ldap.so.2"
+#define LIBNSS_TEST1_SO "libnss_test1.so.2"
+#define LIBNSS_TEST2_SO "libnss_test2.so.2"
+#define LIBPTHREAD_SO "libpthread.so.0"
+#define LIBRESOLV_SO "libresolv.so.2"
+#define LIBRT_SO "librt.so.1"
+#define LIBTHREAD_DB_SO "libthread_db.so.1"
+#define LIBUTIL_SO "libutil.so.1"
+
+#endif /* gnu/lib-names.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/gnu/stubs.h b/lib/libc/include/m68k-linux-gnu/gnu/stubs.h
new file mode 100644
index 0000000000..636dc73283
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/gnu/stubs.h
@@ -0,0 +1,16 @@
+/* This file is automatically generated.
+ It defines a symbol `__stub_FUNCTION' for each function
+ in the C library which is a stub, meaning it will fail
+ every time called, usually setting errno to ENOSYS. */
+
+#ifdef _LIBC
+ #error Applications may not define the macro _LIBC
+#endif
+
+#define __stub_chflags
+#define __stub_fchflags
+#define __stub_gtty
+#define __stub_revoke
+#define __stub_setlogin
+#define __stub_sigreturn
+#define __stub_stty \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/sys/reg.h b/lib/libc/include/m68k-linux-gnu/sys/reg.h
new file mode 100644
index 0000000000..53b46a16aa
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/sys/reg.h
@@ -0,0 +1,101 @@
+/* Copyright (C) 1998-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_REG_H
+#define _SYS_REG_H 1
+
+/* Index into an array of 4 byte integers returned from ptrace for
+ location of the users' stored general purpose registers. */
+
+enum
+{
+ PT_D1 = 0,
+#define PT_D1 PT_D1
+ PT_D2 = 1,
+#define PT_D2 PT_D2
+ PT_D3 = 2,
+#define PT_D3 PT_D3
+ PT_D4 = 3,
+#define PT_D4 PT_D4
+ PT_D5 = 4,
+#define PT_D5 PT_D5
+ PT_D6 = 5,
+#define PT_D6 PT_D6
+ PT_D7 = 6,
+#define PT_D7 PT_D7
+ PT_A0 = 7,
+#define PT_A0 PT_A0
+ PT_A1 = 8,
+#define PT_A1 PT_A1
+ PT_A2 = 9,
+#define PT_A2 PT_A2
+ PT_A3 = 10,
+#define PT_A3 PT_A3
+ PT_A4 = 11,
+#define PT_A4 PT_A4
+ PT_A5 = 12,
+#define PT_A5 PT_A5
+ PT_A6 = 13,
+#define PT_A6 PT_A6
+ PT_D0 = 14,
+#define PT_D0 PT_D0
+ PT_USP = 15,
+#define PT_USP PT_USP
+ PT_ORIG_D0 = 16,
+#define PT_ORIG_D0 PT_ORIG_D0
+ PT_SR = 17,
+#define PT_SR PT_SR
+ PT_PC = 18,
+#define PT_PC PT_PC
+
+#ifdef __mcoldfire__
+ PT_FP0 = 21,
+ PT_FP1 = 23,
+ PT_FP2 = 25,
+ PT_FP3 = 27,
+ PT_FP4 = 29,
+ PT_FP5 = 31,
+ PT_FP6 = 33,
+ PT_FP7 = 35,
+#else
+ PT_FP0 = 21,
+ PT_FP1 = 24,
+ PT_FP2 = 27,
+ PT_FP3 = 30,
+ PT_FP4 = 33,
+ PT_FP5 = 36,
+ PT_FP6 = 39,
+ PT_FP7 = 42,
+#endif
+#define PT_FP0 PT_FP0
+#define PT_FP1 PT_FP1
+#define PT_FP2 PT_FP2
+#define PT_FP3 PT_FP3
+#define PT_FP4 PT_FP4
+#define PT_FP5 PT_FP5
+#define PT_FP6 PT_FP6
+#define PT_FP7 PT_FP7
+
+ PT_FPCR = 45,
+#define PT_FPCR PT_FPCR
+ PT_FPSR = 46,
+#define PT_FPSR PT_FPSR
+ PT_FPIAR = 47
+#define PT_FPIAR PT_FPIAR
+};
+
+#endif /* _SYS_REG_H */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/sys/ucontext.h b/lib/libc/include/m68k-linux-gnu/sys/ucontext.h
new file mode 100644
index 0000000000..6ec3ab57da
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/sys/ucontext.h
@@ -0,0 +1,130 @@
+/* Copyright (C) 1997-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+/* System V/m68k ABI compliant context switching support. */
+
+#ifndef _SYS_UCONTEXT_H
+#define _SYS_UCONTEXT_H 1
+
+#include <features.h>
+
+#include <bits/types/sigset_t.h>
+#include <bits/types/stack_t.h>
+
+
+/* Type for general register. */
+typedef int greg_t;
+
+/* Number of general registers. */
+#define __NGREG 18
+#ifdef __USE_MISC
+# define NGREG __NGREG
+#endif
+
+/* Container for all general registers. */
+typedef greg_t gregset_t[__NGREG];
+
+#ifdef __USE_MISC
+/* Number of each register is the `gregset_t' array. */
+enum
+{
+ R_D0 = 0,
+# define R_D0 R_D0
+ R_D1 = 1,
+# define R_D1 R_D1
+ R_D2 = 2,
+# define R_D2 R_D2
+ R_D3 = 3,
+# define R_D3 R_D3
+ R_D4 = 4,
+# define R_D4 R_D4
+ R_D5 = 5,
+# define R_D5 R_D5
+ R_D6 = 6,
+# define R_D6 R_D6
+ R_D7 = 7,
+# define R_D7 R_D7
+ R_A0 = 8,
+# define R_A0 R_A0
+ R_A1 = 9,
+# define R_A1 R_A1
+ R_A2 = 10,
+# define R_A2 R_A2
+ R_A3 = 11,
+# define R_A3 R_A3
+ R_A4 = 12,
+# define R_A4 R_A4
+ R_A5 = 13,
+# define R_A5 R_A5
+ R_A6 = 14,
+# define R_A6 R_A6
+ R_A7 = 15,
+# define R_A7 R_A7
+ R_SP = 15,
+# define R_SP R_SP
+ R_PC = 16,
+# define R_PC R_PC
+ R_PS = 17
+# define R_PS R_PS
+};
+#endif
+
+#ifdef __USE_MISC
+# define __ctx(fld) fld
+#else
+# define __ctx(fld) __ ## fld
+#endif
+
+/* Structure to describe FPU registers. */
+typedef struct
+{
+ int __ctx(f_pcr);
+ int __ctx(f_psr);
+ int __ctx(f_fpiaddr);
+#ifdef __mcoldfire__
+ int __ctx(f_fpregs)[8][2];
+#else
+ int __ctx(f_fpregs)[8][3];
+#endif
+} fpregset_t;
+
+/* Context to describe whole processor state. */
+typedef struct
+{
+ int __ctx(version);
+ gregset_t __ctx(gregs);
+ fpregset_t __ctx(fpregs);
+} mcontext_t;
+
+#ifdef __USE_MISC
+# define MCONTEXT_VERSION 2
+#endif
+
+/* Userlevel context. */
+typedef struct ucontext_t
+{
+ unsigned long __ctx(uc_flags);
+ struct ucontext_t *uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long __glibc_reserved1[80];
+ sigset_t uc_sigmask;
+} ucontext_t;
+
+#undef __ctx
+
+#endif /* sys/ucontext.h */ \ No newline at end of file
diff --git a/lib/libc/include/m68k-linux-gnu/sys/user.h b/lib/libc/include/m68k-linux-gnu/sys/user.h
new file mode 100644
index 0000000000..7e210f85b9
--- /dev/null
+++ b/lib/libc/include/m68k-linux-gnu/sys/user.h
@@ -0,0 +1,65 @@
+/* Copyright (C) 2008-2021 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library. If not, see
+ <https://www.gnu.org/licenses/>. */
+
+#ifndef _SYS_USER_H
+#define _SYS_USER_H 1
+
+/* The whole purpose of this file is for GDB and GDB only. Don't read
+ too much into it. Don't use it for anything other than GDB unless
+ you know what you are doing. */
+
+struct user_m68kfp_struct {
+ unsigned long fpregs[8*3];
+ unsigned long fpcntl[3];
+};
+
+struct user_regs_struct {
+ long d1, d2, d3, d4, d5, d6, d7;
+ long a0, a1, a2, a3, a4, a5, a6;
+ long d0;
+ long usp;
+ long orig_d0;
+ short stkadj;
+ short sr;
+ long pc;
+ short fmtvec;
+ short __fill;
+};
+
+struct user {
+ struct user_regs_struct regs;
+ int u_fpvalid;
+ struct user_m68kfp_struct m68kfp;
+ unsigned long int u_tsize;
+ unsigned long int u_dsize;
+ unsigned long int u_ssize;
+ unsigned long start_code;
+ unsigned long start_stack;
+ long int signal;
+ int reserved;
+ unsigned long u_ar0;
+ struct user_m68kfp_struct *u_fpstate;
+ unsigned long magic;
+ char u_comm[32];
+};
+
+#define NBPG 4096
+#define UPAGES 1
+#define HOST_TEXT_START_ADDR u.start_code
+#define HOST_STACK_END_ADDR (u.start_stack + u.u_ssize * NBPG)
+
+#endif \ No newline at end of file