generic: 6.12: manually rebuild hack patches
Manually rebuild hack patches: - 200-tools_portability.patch - 204-module_strip.patch - 210-darwin_scripts_include.patch - 251-kconfig.patch - 421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch - 610-net-page_pool-try-to-free-deferred-skbs-while-waitin.patch - 721-net-add-packet-mangeling.patch - 725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch - 760-net-usb-r8152-add-LED-configuration-from-OF.patch - 800-GPIO-add-named-gpio-exports.patch - 901-debloat_sock_diag.patch - 902-debloat_proc.patch - 904-debloat_dma_buf.patch - 910-kobject_uevent.patch - 911-kobject_add_broadcast_uevent.patch - 930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch Signed-off-by: Mieczyslaw Nalewaj <namiltd@yahoo.com> [ improve commit title ] Link: https://github.com/openwrt/openwrt/pull/16547 Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
This commit is contained in:
committed by
Christian Marangi
parent
5a7de563e0
commit
a4cfd32917
@@ -40,20 +40,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
# sysroots and flags or to avoid the GCC call in pure Clang builds.
|
||||
--- a/tools/include/linux/types.h
|
||||
+++ b/tools/include/linux/types.h
|
||||
@@ -10,8 +10,12 @@
|
||||
#define __SANE_USERSPACE_TYPES__ /* For PPC64, to get LL64 types */
|
||||
#endif
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include <tools/linux_types.h>
|
||||
+#else
|
||||
#include <asm/types.h>
|
||||
#include <asm/posix_types.h>
|
||||
+#endif
|
||||
|
||||
struct page;
|
||||
struct kmem_cache;
|
||||
@@ -56,6 +60,7 @@ typedef __s8 s8;
|
||||
@@ -56,6 +56,7 @@ typedef __s8 s8;
|
||||
#define __user
|
||||
#endif
|
||||
#define __must_check
|
||||
@@ -61,19 +48,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
#define __cold
|
||||
|
||||
typedef __u16 __bitwise __le16;
|
||||
--- a/tools/lib/subcmd/exec-cmd.c
|
||||
+++ b/tools/lib/subcmd/exec-cmd.c
|
||||
@@ -12,7 +12,10 @@
|
||||
#include "subcmd-config.h"
|
||||
|
||||
#define MAX_ARGS 32
|
||||
+
|
||||
+#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
+#endif
|
||||
|
||||
static const char *argv_exec_path;
|
||||
static const char *argv0_path;
|
||||
--- a/tools/objtool/include/objtool/objtool.h
|
||||
+++ b/tools/objtool/include/objtool/objtool.h
|
||||
@@ -12,6 +12,7 @@
|
||||
@@ -93,14 +67,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
+#include <string.h>
|
||||
+
|
||||
/**
|
||||
* fls - find last (most-significant) bit set
|
||||
* generic_fls - find last (most-significant) bit set
|
||||
* @x: the word to search
|
||||
@@ -10,6 +12,7 @@
|
||||
* Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
|
||||
*/
|
||||
|
||||
+#define fls __linux_fls
|
||||
static __always_inline int fls(unsigned int x)
|
||||
+#define generic_fls __linux_fls
|
||||
static __always_inline int generic_fls(unsigned int x)
|
||||
{
|
||||
int r = 32;
|
||||
--- a/tools/lib/string.c
|
||||
@@ -134,29 +108,24 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
--- a/tools/arch/x86/include/asm/orc_types.h
|
||||
+++ b/tools/arch/x86/include/asm/orc_types.h
|
||||
@@ -46,7 +46,6 @@
|
||||
@@ -46,7 +46,17 @@
|
||||
#define ORC_TYPE_REGS_PARTIAL 4
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
-#include <asm/byteorder.h>
|
||||
+#ifdef __APPLE__
|
||||
+#include <endian.h>
|
||||
+
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
+#define __LITTLE_ENDIAN_BITFIELD
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
+#define __BIG_ENDIAN_BITFIELD
|
||||
+#endif
|
||||
+#else
|
||||
#include <asm/byteorder.h>
|
||||
+#endif
|
||||
|
||||
/*
|
||||
* This struct is more or less a vastly simplified version of the DWARF Call
|
||||
@@ -59,12 +58,12 @@
|
||||
struct orc_entry {
|
||||
s16 sp_offset;
|
||||
s16 bp_offset;
|
||||
-#if defined(__LITTLE_ENDIAN_BITFIELD)
|
||||
+#if __BYTE_ORDER == __LITTLE_ENDIAN
|
||||
unsigned sp_reg:4;
|
||||
unsigned bp_reg:4;
|
||||
unsigned type:3;
|
||||
unsigned signal:1;
|
||||
-#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
+#elif __BYTE_ORDER == __BIG_ENDIAN
|
||||
unsigned bp_reg:4;
|
||||
unsigned sp_reg:4;
|
||||
unsigned unused:4;
|
||||
--- a/tools/include/linux/rbtree.h
|
||||
+++ b/tools/include/linux/rbtree.h
|
||||
@@ -18,7 +18,6 @@
|
||||
@@ -167,53 +136,19 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
|
||||
struct rb_node {
|
||||
unsigned long __rb_parent_color;
|
||||
--- a/tools/include/tools/be_byteshift.h
|
||||
+++ b/tools/include/tools/be_byteshift.h
|
||||
@@ -2,6 +2,10 @@
|
||||
#ifndef _TOOLS_BE_BYTESHIFT_H
|
||||
#define _TOOLS_BE_BYTESHIFT_H
|
||||
--- a/tools/lib/subcmd/exec-cmd.c
|
||||
+++ b/tools/lib/subcmd/exec-cmd.c
|
||||
@@ -12,7 +12,10 @@
|
||||
#include "subcmd-config.h"
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include "linux_types.h"
|
||||
#define MAX_ARGS 32
|
||||
+
|
||||
+#ifndef PATH_MAX
|
||||
#define PATH_MAX 4096
|
||||
+#endif
|
||||
+
|
||||
#include <stdint.h>
|
||||
|
||||
static inline uint16_t __get_unaligned_be16(const uint8_t *p)
|
||||
--- a/tools/include/tools/le_byteshift.h
|
||||
+++ b/tools/include/tools/le_byteshift.h
|
||||
@@ -2,6 +2,10 @@
|
||||
#ifndef _TOOLS_LE_BYTESHIFT_H
|
||||
#define _TOOLS_LE_BYTESHIFT_H
|
||||
|
||||
+#ifndef __linux__
|
||||
+#include "linux_types.h"
|
||||
+#endif
|
||||
+
|
||||
#include <stdint.h>
|
||||
|
||||
static inline uint16_t __get_unaligned_le16(const uint8_t *p)
|
||||
--- /dev/null
|
||||
+++ b/tools/include/tools/linux_types.h
|
||||
@@ -0,0 +1,18 @@
|
||||
+#ifndef __LINUX_TYPES_H
|
||||
+#define __LINUX_TYPES_H
|
||||
+
|
||||
+#include <stdint.h>
|
||||
+
|
||||
+typedef int8_t __s8;
|
||||
+typedef uint8_t __u8;
|
||||
+
|
||||
+typedef int16_t __s16;
|
||||
+typedef uint16_t __u16;
|
||||
+
|
||||
+typedef int32_t __s32;
|
||||
+typedef uint32_t __u32;
|
||||
+
|
||||
+typedef int64_t __s64;
|
||||
+typedef uint64_t __u64;
|
||||
+
|
||||
+#endif
|
||||
static const char *argv_exec_path;
|
||||
static const char *argv0_path;
|
||||
--- a/tools/objtool/Makefile
|
||||
+++ b/tools/objtool/Makefile
|
||||
@@ -39,6 +39,8 @@ OBJTOOL_LDFLAGS := $(LIBELF_LIBS) $(LIBS
|
||||
@@ -225,40 +160,11 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
# Always want host compilation.
|
||||
HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)"
|
||||
|
||||
--- a/tools/objtool/orc_dump.c
|
||||
+++ b/tools/objtool/orc_dump.c
|
||||
@@ -4,10 +4,10 @@
|
||||
*/
|
||||
|
||||
#include <unistd.h>
|
||||
-#include <asm/orc_types.h>
|
||||
#include <objtool/objtool.h>
|
||||
#include <objtool/warn.h>
|
||||
#include <objtool/endianness.h>
|
||||
+#include <asm/orc_types.h>
|
||||
|
||||
static const char *reg_name(unsigned int reg)
|
||||
{
|
||||
--- a/tools/objtool/orc_gen.c
|
||||
+++ b/tools/objtool/orc_gen.c
|
||||
@@ -7,11 +7,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include <linux/objtool_types.h>
|
||||
-#include <asm/orc_types.h>
|
||||
|
||||
#include <objtool/check.h>
|
||||
#include <objtool/warn.h>
|
||||
#include <objtool/endianness.h>
|
||||
+#include <asm/orc_types.h>
|
||||
|
||||
static int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi,
|
||||
struct instruction *insn)
|
||||
--- a/tools/arch/x86/lib/insn.c
|
||||
+++ b/tools/arch/x86/lib/insn.c
|
||||
@@ -15,7 +15,11 @@
|
||||
#include "../include/asm/insn.h" /* __ignore_sync_check__ */
|
||||
#include "../include/asm-generic/unaligned.h" /* __ignore_sync_check__ */
|
||||
#include <linux/unaligned.h> /* __ignore_sync_check__ */
|
||||
|
||||
+#ifdef __KERNEL__
|
||||
#include <linux/errno.h>
|
||||
|
||||
Reference in New Issue
Block a user