update init gcc-7
Signed-off-by: zhangwuji <12398375+zhangwuji1995@user.noreply.gitee.com>
This commit is contained in:
parent
3aa415941f
commit
4abeb0747d
44
0001-fix-sys-ustat.h-problem.patch
Normal file
44
0001-fix-sys-ustat.h-problem.patch
Normal file
@ -0,0 +1,44 @@
|
||||
From 88fe8bed49ebbf86c29990bdb536171bb1ae4d3d Mon Sep 17 00:00:00 2001
|
||||
From: <zhangwuji1@huawei.com>
|
||||
Date: Wed, 7 Jun 2023 14:24:43 +0000
|
||||
Subject: [PATCH] fix sys/ustat.h problem
|
||||
|
||||
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=71b55d45e4304f5e2e98ac30473c581f58fc486b
|
||||
---
|
||||
.../sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++--
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
index 858bb218450..de18e56d11c 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
|
||||
# include <sys/procfs.h>
|
||||
#endif
|
||||
#include <sys/user.h>
|
||||
-#include <sys/ustat.h>
|
||||
#include <linux/cyclades.h>
|
||||
#include <linux/if_eql.h>
|
||||
#include <linux/if_plip.h>
|
||||
@@ -250,7 +249,19 @@ namespace __sanitizer {
|
||||
#endif // SANITIZER_LINUX || SANITIZER_FREEBSD
|
||||
|
||||
#if SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
- unsigned struct_ustat_sz = sizeof(struct ustat);
|
||||
+ // Use pre-computed size of struct ustat to avoid <sys/ustat.h> which
|
||||
+ // has been removed from glibc 2.28.
|
||||
+#if defined(__aarch64__) || defined(__s390x__) || defined (__mips64) \
|
||||
+ || defined(__powerpc64__) || defined(__arch64__) || defined(__sparcv9) \
|
||||
+ || defined(__x86_64__)
|
||||
+#define SIZEOF_STRUCT_USTAT 32
|
||||
+#elif defined(__arm__) || defined(__i386__) || defined(__mips__) \
|
||||
+ || defined(__powerpc__) || defined(__s390__)
|
||||
+#define SIZEOF_STRUCT_USTAT 20
|
||||
+#else
|
||||
+#error Unknown size of struct ustat
|
||||
+#endif
|
||||
+ unsigned struct_ustat_sz = SIZEOF_STRUCT_USTAT;
|
||||
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
|
||||
unsigned struct_statvfs64_sz = sizeof(struct statvfs64);
|
||||
#endif // SANITIZER_LINUX && !SANITIZER_ANDROID
|
||||
--
|
||||
42
0002-fix-libsanitizer-multiple-definition.patch
Normal file
42
0002-fix-libsanitizer-multiple-definition.patch
Normal file
@ -0,0 +1,42 @@
|
||||
From e195f6bb86c7fb3a009eba292a78ed13f3d19dc2 Mon Sep 17 00:00:00 2001
|
||||
From: <zhangwuji1@huawei.com>
|
||||
Date: Wed, 7 Jun 2023 15:34:03 +0000
|
||||
Subject: [PATCH] fix libsanitizer multiple definition
|
||||
|
||||
https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=2701442d0cf6292f6624443c15813d6d1a3562fe
|
||||
---
|
||||
.../sanitizer_platform_limits_posix.cc | 10 ++++++----
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
index aae5ec2fe82..72277af7026 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
@@ -62,7 +62,9 @@
|
||||
#include <sys/vt.h>
|
||||
#include <linux/cdrom.h>
|
||||
#include <linux/fd.h>
|
||||
+#if SANITIZER_ANDROID
|
||||
#include <linux/fs.h>
|
||||
+#endif
|
||||
#include <linux/hdreg.h>
|
||||
#include <linux/input.h>
|
||||
#include <linux/ioctl.h>
|
||||
@@ -834,10 +836,10 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
|
||||
unsigned IOCTL_EVIOCGPROP = IOCTL_NOT_PRESENT;
|
||||
unsigned IOCTL_EVIOCSKEYCODE_V2 = IOCTL_NOT_PRESENT;
|
||||
#endif
|
||||
- unsigned IOCTL_FS_IOC_GETFLAGS = FS_IOC_GETFLAGS;
|
||||
- unsigned IOCTL_FS_IOC_GETVERSION = FS_IOC_GETVERSION;
|
||||
- unsigned IOCTL_FS_IOC_SETFLAGS = FS_IOC_SETFLAGS;
|
||||
- unsigned IOCTL_FS_IOC_SETVERSION = FS_IOC_SETVERSION;
|
||||
+ unsigned IOCTL_FS_IOC_GETFLAGS = _IOR('f', 1, long);
|
||||
+ unsigned IOCTL_FS_IOC_GETVERSION = _IOR('v', 1, long);
|
||||
+ unsigned IOCTL_FS_IOC_SETFLAGS = _IOW('f', 2, long);
|
||||
+ unsigned IOCTL_FS_IOC_SETVERSION = _IOW('v', 2, long);
|
||||
unsigned IOCTL_GIO_CMAP = GIO_CMAP;
|
||||
unsigned IOCTL_GIO_FONT = GIO_FONT;
|
||||
unsigned IOCTL_GIO_UNIMAP = GIO_UNIMAP;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
56
0003-Fix-error-size-of-array-is-negative.patch
Normal file
56
0003-Fix-error-size-of-array-is-negative.patch
Normal file
@ -0,0 +1,56 @@
|
||||
From 9e7125069ad4f7f02ebc1e7d163b438e17ab2174 Mon Sep 17 00:00:00 2001
|
||||
From: <zhangwuji1@huawei.com>
|
||||
Date: Wed, 7 Jun 2023 15:54:37 +0000
|
||||
Subject: [PATCH] Fix error 'size of array is negative'
|
||||
|
||||
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=4abc46b51af5751d657764d0c44b8a4aeed06302
|
||||
---
|
||||
.../sanitizer_common/sanitizer_platform_limits_posix.cc | 5 +++--
|
||||
.../sanitizer_common/sanitizer_platform_limits_posix.h | 9 +--------
|
||||
2 files changed, 4 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
index aae5ec2fe82..2793ce32aa0 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
|
||||
@@ -1134,8 +1134,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
|
||||
-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
|
||||
-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field. */
|
||||
+#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
|
||||
+/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
|
||||
+ on many architectures. */
|
||||
CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
|
||||
#endif
|
||||
|
||||
diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
index e3cd4e6bb76..a9dc64b38f2 100644
|
||||
--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
+++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
|
||||
@@ -211,20 +211,13 @@ namespace __sanitizer {
|
||||
unsigned long __unused1;
|
||||
unsigned long __unused2;
|
||||
#elif defined(__sparc__)
|
||||
-# if defined(__arch64__)
|
||||
unsigned mode;
|
||||
- unsigned short __pad1;
|
||||
-# else
|
||||
- unsigned short __pad1;
|
||||
- unsigned short mode;
|
||||
unsigned short __pad2;
|
||||
-# endif
|
||||
unsigned short __seq;
|
||||
unsigned long long __unused1;
|
||||
unsigned long long __unused2;
|
||||
#else
|
||||
- unsigned short mode;
|
||||
- unsigned short __pad1;
|
||||
+ unsigned int mode;
|
||||
unsigned short __seq;
|
||||
unsigned short __pad2;
|
||||
#if defined(__x86_64__) && !defined(_LP64)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
BIN
gcc-7.3.0.tar.gz
Normal file
BIN
gcc-7.3.0.tar.gz
Normal file
Binary file not shown.
2723
gcc-7.spec
Normal file
2723
gcc-7.spec
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user