summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2023-12-06 13:52:58 -0800
committerElliott Hughes <enh@google.com>2023-12-06 13:52:58 -0800
commitaf2f412b800ad5836b3dac94d0d54b143f8394de (patch)
tree6f22929d7fe1eee01e1107d38d7a1ff5898ad64f
parent39f900b91afa8e5cfb877bb2b3889607efd32ec6 (diff)
downloadx86_64-linux-glibc2.17-4.8-af2f412b800ad5836b3dac94d0d54b143f8394de.tar.gz
Remove patch files.
We haven't maintained these, so it's misleading to have a subset. I've kept the one actual _sysroot_ patch though, mainly out of ignorance :-) Test: N/A Change-Id: I97547c09ea917f1379dee0c5eae18707c26f1078
-rw-r--r--sysroot-patches/glibc-2.17-add-userfaultfd.patch147
-rw-r--r--sysroot-patches/glibc-2.17-define-__NR_bpf.patch25
-rw-r--r--sysroot-patches/glibc-2.17-define-gnu-inline.patch35
-rw-r--r--sysroot-patches/glibc-2.17-enable-so-reuse-port.patch16
-rw-r--r--sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch37
5 files changed, 0 insertions, 260 deletions
diff --git a/sysroot-patches/glibc-2.17-add-userfaultfd.patch b/sysroot-patches/glibc-2.17-add-userfaultfd.patch
deleted file mode 100644
index fb3a19a..0000000
--- a/sysroot-patches/glibc-2.17-add-userfaultfd.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-diff --git a/sysroot/usr/include/linux/userfaultfd.h b/sysroot/usr/include/linux/userfaultfd.h
-new file mode 100644
-index 0000000..ca7b7a5
---- /dev/null
-+++ b/sysroot/usr/include/linux/userfaultfd.h
-@@ -0,0 +1,141 @@
-+/****************************************************************************
-+ ****************************************************************************
-+ ***
-+ *** This header was automatically generated from a Linux kernel header
-+ *** of the same name, to make information necessary for userspace to
-+ *** call into the kernel available to libc. It contains only constants,
-+ *** structures, and macros generated from the original header, and thus,
-+ *** contains no copyrightable information.
-+ ***
-+ *** To edit the content of this header, modify the corresponding
-+ *** source file (e.g. under external/kernel-headers/original/) then
-+ *** run bionic/libc/kernel/tools/update_all.py
-+ ***
-+ *** Any manual change here will be lost the next time this script will
-+ *** be run. You've been warned!
-+ ***
-+ ****************************************************************************
-+ ****************************************************************************/
-+#ifndef _LINUX_USERFAULTFD_H
-+#define _LINUX_USERFAULTFD_H
-+#include <linux/types.h>
-+#define UFFD_API ((__u64) 0xAA)
-+#define UFFD_API_REGISTER_MODES (UFFDIO_REGISTER_MODE_MISSING | UFFDIO_REGISTER_MODE_WP | UFFDIO_REGISTER_MODE_MINOR)
-+#define UFFD_API_FEATURES (UFFD_FEATURE_PAGEFAULT_FLAG_WP | UFFD_FEATURE_EVENT_FORK | UFFD_FEATURE_EVENT_REMAP | UFFD_FEATURE_EVENT_REMOVE | UFFD_FEATURE_EVENT_UNMAP | UFFD_FEATURE_MISSING_HUGETLBFS | UFFD_FEATURE_MISSING_SHMEM | UFFD_FEATURE_SIGBUS | UFFD_FEATURE_THREAD_ID | UFFD_FEATURE_MINOR_HUGETLBFS | UFFD_FEATURE_MINOR_SHMEM)
-+#define UFFD_API_IOCTLS ((__u64) 1 << _UFFDIO_REGISTER | (__u64) 1 << _UFFDIO_UNREGISTER | (__u64) 1 << _UFFDIO_API)
-+#define UFFD_API_RANGE_IOCTLS ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_ZEROPAGE | (__u64) 1 << _UFFDIO_WRITEPROTECT | (__u64) 1 << _UFFDIO_CONTINUE)
-+#define UFFD_API_RANGE_IOCTLS_BASIC ((__u64) 1 << _UFFDIO_WAKE | (__u64) 1 << _UFFDIO_COPY | (__u64) 1 << _UFFDIO_CONTINUE)
-+#define _UFFDIO_REGISTER (0x00)
-+#define _UFFDIO_UNREGISTER (0x01)
-+#define _UFFDIO_WAKE (0x02)
-+#define _UFFDIO_COPY (0x03)
-+#define _UFFDIO_ZEROPAGE (0x04)
-+#define _UFFDIO_WRITEPROTECT (0x06)
-+#define _UFFDIO_CONTINUE (0x07)
-+#define _UFFDIO_API (0x3F)
-+#define UFFDIO 0xAA
-+#define UFFDIO_API _IOWR(UFFDIO, _UFFDIO_API, struct uffdio_api)
-+#define UFFDIO_REGISTER _IOWR(UFFDIO, _UFFDIO_REGISTER, struct uffdio_register)
-+#define UFFDIO_UNREGISTER _IOR(UFFDIO, _UFFDIO_UNREGISTER, struct uffdio_range)
-+#define UFFDIO_WAKE _IOR(UFFDIO, _UFFDIO_WAKE, struct uffdio_range)
-+#define UFFDIO_COPY _IOWR(UFFDIO, _UFFDIO_COPY, struct uffdio_copy)
-+#define UFFDIO_ZEROPAGE _IOWR(UFFDIO, _UFFDIO_ZEROPAGE, struct uffdio_zeropage)
-+#define UFFDIO_WRITEPROTECT _IOWR(UFFDIO, _UFFDIO_WRITEPROTECT, struct uffdio_writeprotect)
-+#define UFFDIO_CONTINUE _IOWR(UFFDIO, _UFFDIO_CONTINUE, struct uffdio_continue)
-+struct uffd_msg {
-+ __u8 event;
-+ __u8 reserved1;
-+ __u16 reserved2;
-+ __u32 reserved3;
-+ union {
-+ struct {
-+ __u64 flags;
-+ __u64 address;
-+ union {
-+ __u32 ptid;
-+ } feat;
-+ } pagefault;
-+ struct {
-+ __u32 ufd;
-+ } fork;
-+ struct {
-+ __u64 from;
-+ __u64 to;
-+ __u64 len;
-+ } remap;
-+ struct {
-+ __u64 start;
-+ __u64 end;
-+ } remove;
-+ struct {
-+ __u64 reserved1;
-+ __u64 reserved2;
-+ __u64 reserved3;
-+ } reserved;
-+ } arg;
-+} __packed;
-+#define UFFD_EVENT_PAGEFAULT 0x12
-+#define UFFD_EVENT_FORK 0x13
-+#define UFFD_EVENT_REMAP 0x14
-+#define UFFD_EVENT_REMOVE 0x15
-+#define UFFD_EVENT_UNMAP 0x16
-+#define UFFD_PAGEFAULT_FLAG_WRITE (1 << 0)
-+#define UFFD_PAGEFAULT_FLAG_WP (1 << 1)
-+#define UFFD_PAGEFAULT_FLAG_MINOR (1 << 2)
-+struct uffdio_api {
-+ __u64 api;
-+#define UFFD_FEATURE_PAGEFAULT_FLAG_WP (1 << 0)
-+#define UFFD_FEATURE_EVENT_FORK (1 << 1)
-+#define UFFD_FEATURE_EVENT_REMAP (1 << 2)
-+#define UFFD_FEATURE_EVENT_REMOVE (1 << 3)
-+#define UFFD_FEATURE_MISSING_HUGETLBFS (1 << 4)
-+#define UFFD_FEATURE_MISSING_SHMEM (1 << 5)
-+#define UFFD_FEATURE_EVENT_UNMAP (1 << 6)
-+#define UFFD_FEATURE_SIGBUS (1 << 7)
-+#define UFFD_FEATURE_THREAD_ID (1 << 8)
-+#define UFFD_FEATURE_MINOR_HUGETLBFS (1 << 9)
-+#define UFFD_FEATURE_MINOR_SHMEM (1 << 10)
-+ __u64 features;
-+ __u64 ioctls;
-+};
-+struct uffdio_range {
-+ __u64 start;
-+ __u64 len;
-+};
-+struct uffdio_register {
-+ struct uffdio_range range;
-+#define UFFDIO_REGISTER_MODE_MISSING ((__u64) 1 << 0)
-+#define UFFDIO_REGISTER_MODE_WP ((__u64) 1 << 1)
-+#define UFFDIO_REGISTER_MODE_MINOR ((__u64) 1 << 2)
-+ __u64 mode;
-+ __u64 ioctls;
-+};
-+struct uffdio_copy {
-+ __u64 dst;
-+ __u64 src;
-+ __u64 len;
-+#define UFFDIO_COPY_MODE_DONTWAKE ((__u64) 1 << 0)
-+#define UFFDIO_COPY_MODE_WP ((__u64) 1 << 1)
-+ __u64 mode;
-+ __s64 copy;
-+};
-+struct uffdio_zeropage {
-+ struct uffdio_range range;
-+#define UFFDIO_ZEROPAGE_MODE_DONTWAKE ((__u64) 1 << 0)
-+ __u64 mode;
-+ __s64 zeropage;
-+};
-+struct uffdio_writeprotect {
-+ struct uffdio_range range;
-+#define UFFDIO_WRITEPROTECT_MODE_WP ((__u64) 1 << 0)
-+#define UFFDIO_WRITEPROTECT_MODE_DONTWAKE ((__u64) 1 << 1)
-+ __u64 mode;
-+};
-+struct uffdio_continue {
-+ struct uffdio_range range;
-+#define UFFDIO_CONTINUE_MODE_DONTWAKE ((__u64) 1 << 0)
-+ __u64 mode;
-+ __s64 mapped;
-+};
-+#define UFFD_USER_MODE_ONLY 1
-+#endif
diff --git a/sysroot-patches/glibc-2.17-define-__NR_bpf.patch b/sysroot-patches/glibc-2.17-define-__NR_bpf.patch
deleted file mode 100644
index 71f4c44..0000000
--- a/sysroot-patches/glibc-2.17-define-__NR_bpf.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-Generating BTF during kernel builds involves building host libbpf, which fails
-unless __NR_bpf is defined.
-
-diff --git a/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_32.h b/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_32.h
-index 45e32d0..6f6cb88 100644
---- a/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_32.h
-+++ b/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_32.h
-@@ -348,5 +348,6 @@
- #define __NR_process_vm_writev 348
- #define __NR_kcmp 349
- #define __NR_finit_module 350
-+#define __NR_bpf 357
-
- #endif /* _ASM_X86_UNISTD_32_H */
-diff --git a/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_64.h b/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_64.h
-index 82e1308..550dade 100644
---- a/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_64.h
-+++ b/sysroot/usr/include/x86_64-linux-gnu/asm/unistd_64.h
-@@ -315,5 +315,6 @@
- #define __NR_process_vm_writev 311
- #define __NR_kcmp 312
- #define __NR_finit_module 313
-+#define __NR_bpf 321
-
- #endif /* _ASM_X86_UNISTD_64_H */
diff --git a/sysroot-patches/glibc-2.17-define-gnu-inline.patch b/sysroot-patches/glibc-2.17-define-gnu-inline.patch
deleted file mode 100644
index b4c3468..0000000
--- a/sysroot-patches/glibc-2.17-define-gnu-inline.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This patch is one of the motivating reasons for upgrading glibc from 2.15.
-
-Unfortunately, we couldn't upgrade to 2.19(*) due to some users having 2.17.
-
-* - which no longer needs the patch, since the #ifdefs around __gnu_inline__ are
- worded so that compilers that don't have __GNUC_PREREQ(4, 3) can still get
- the reasonable definition for __gnu_inline__
-
------
-diff --git a/amd64/usr/include/x86_64-linux-gnu/sys/cdefs.h b/amd64/usr/include/x86_64-linux-gnu/sys/cdefs.h
-index fb6c959..bd9ee92 100644
---- a/usr/include/x86_64-linux-gnu/sys/cdefs.h
-+++ b/usr/include/x86_64-linux-gnu/sys/cdefs.h
-@@ -320,7 +320,7 @@
-
- /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
- inline semantics, unless -fgnu89-inline is used. */
--#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__
-+#if (!defined __cplusplus || __GNUC_PREREQ (4,3) || defined __clang__) && defined __GNUC__
- # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
- # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
- # define __extern_always_inline \
-diff --git a/i386/usr/include/i386-linux-gnu/sys/cdefs.h b/i386/usr/include/i386-linux-gnu/sys/cdefs.h
-index fb6c959..bd9ee92 100644
---- a/usr/include/i386-linux-gnu/sys/cdefs.h
-+++ b/usr/include/i386-linux-gnu/sys/cdefs.h
-@@ -320,7 +320,7 @@
-
- /* GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
- inline semantics, unless -fgnu89-inline is used. */
--#if (!defined __cplusplus || __GNUC_PREREQ (4,3)) && defined __GNUC__
-+#if (!defined __cplusplus || __GNUC_PREREQ (4,3) || defined __clang__) && defined __GNUC__
- # if defined __GNUC_STDC_INLINE__ || defined __cplusplus
- # define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
- # define __extern_always_inline \
diff --git a/sysroot-patches/glibc-2.17-enable-so-reuse-port.patch b/sysroot-patches/glibc-2.17-enable-so-reuse-port.patch
deleted file mode 100644
index 700c6a1..0000000
--- a/sysroot-patches/glibc-2.17-enable-so-reuse-port.patch
+++ /dev/null
@@ -1,16 +0,0 @@
-b/159148705 . All of our supported users have Linux 3.9+ at this point, so
-SO_REUSEPORT should be made available to anyone who wants to use it.
-
-diff --git a/sysroot/usr/include/asm-generic/socket.h b/sysroot/usr/include/asm-generic/socket.h
-index 2d32d07..316f06c 100644
---- a/sysroot/usr/include/asm-generic/socket.h
-+++ b/sysroot/usr/include/asm-generic/socket.h
-@@ -22,7 +22,7 @@
- #define SO_PRIORITY 12
- #define SO_LINGER 13
- #define SO_BSDCOMPAT 14
--/* To add :#define SO_REUSEPORT 15 */
-+#define SO_REUSEPORT 15
-
- #ifndef SO_PASSCRED /* powerpc only differs in these */
- #define SO_PASSCRED 16
diff --git a/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch b/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch
deleted file mode 100644
index 025fa94..0000000
--- a/sysroot-patches/glibc-update-perf_event.h-to-build-lldb-on-linux.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-b/191084510. Update perf_event.h to has aux_size, to fix below error when building lldb on
-linux:
-
-llvm-project/lldb/source/Plugins/Process/Linux/IntelPTManager.cpp:53:23:
-error: no member named 'aux_size' in 'perf_event_mmap_page'
- return m_mmap_meta->aux_size;
- ~~~~~~~~~~~~~^
------
-diff --git a/usr/include/linux/perf_event.h b/usr/include/linux/perf_event.h
-index 1c749ee..606f875 100644
---- a/usr/include/linux/perf_event.h
-+++ b/usr/include/linux/perf_event.h
-@@ -433,6 +433,24 @@ struct perf_event_mmap_page {
- */
- __u64 data_head; /* head in the data section */
- __u64 data_tail; /* user-space written tail */
-+ __u64 data_offset; /* where the buffer starts */
-+ __u64 data_size; /* data buffer size */
-+
-+ /*
-+ * AUX area is defined by aux_{offset,size} fields that should be set
-+ * by the userspace, so that
-+ *
-+ * aux_offset >= data_offset + data_size
-+ *
-+ * prior to mmap()ing it. Size of the mmap()ed area should be aux_size.
-+ *
-+ * Ring buffer pointers aux_{head,tail} have the same semantics as
-+ * data_{head,tail} and same ordering rules apply.
-+ */
-+ __u64 aux_head;
-+ __u64 aux_tail;
-+ __u64 aux_offset;
-+ __u64 aux_size;
- };
-
- #define PERF_RECORD_MISC_CPUMODE_MASK (7 << 0)