diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-01 08:02:02 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2019-06-01 08:02:02 +0100 |
commit | 55fcb515620a8f7d3bb77eba938aa0fcf0d67c96 (patch) | |
tree | 1935969b92e7627ef941dfbdf0960392a5f58c69 /4.9.4 | |
parent | 4.8.5: tweak libsanitizer for modern glibc (diff) | |
download | gcc-patches-55fcb515620a8f7d3bb77eba938aa0fcf0d67c96.tar.gz gcc-patches-55fcb515620a8f7d3bb77eba938aa0fcf0d67c96.tar.bz2 gcc-patches-55fcb515620a8f7d3bb77eba938aa0fcf0d67c96.zip |
4.9.4: backport ustat.h removal fir gcc-4.9.4
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to '4.9.4')
-rw-r--r-- | 4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch | 71 | ||||
-rw-r--r-- | 4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch | 17 | ||||
-rw-r--r-- | 4.9.4/gentoo/README.history | 2 |
3 files changed, 90 insertions, 0 deletions
diff --git a/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch b/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch new file mode 100644 index 0000000..e9797e4 --- /dev/null +++ b/4.9.4/gentoo/100_all_avoid-ustat-glibc-2.28.patch @@ -0,0 +1,71 @@ +https://github.com/buildroot/buildroot/commit/6b33b7ba517bee4d88af9b1827201df923b4a600.patch + +From 61f38c64c01a15560026115a157b7021ec67bd3b Mon Sep 17 00:00:00 2001 +From: hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> +Date: Thu, 24 May 2018 20:21:54 +0000 +Subject: [PATCH] libsanitizer: Use pre-computed size of struct ustat for Linux + +Cherry-pick compiler-rt revision 333213: + +<sys/ustat.h> has been removed from glibc 2.28 by: + +commit cf2478d53ad7071e84c724a986b56fe17f4f4ca7 +Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> +Date: Sun Mar 18 11:28:59 2018 +0800 + + Deprecate ustat syscall interface + +This patch uses pre-computed size of struct ustat for Linux. + + PR sanitizer/85835 + * sanitizer_common/sanitizer_platform_limits_posix.cc: Don't + include <sys/ustat.h> for Linux. + (SIZEOF_STRUCT_USTAT): New. + (struct_ustat_sz): Use SIZEOF_STRUCT_USTAT for Linux. + + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@260688 138bc75d-0d04-0410-961f-82ee72b054a4 + +Backported from upstream commit +https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=61f38c64c01a15560026115a157b7021ec67bd3b + +Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de> +--- + libsanitizer/ChangeLog | 8 ++++++++ + .../sanitizer_common/sanitizer_platform_limits_posix.cc | 15 +++++++++++++-- + 2 files changed, 21 insertions(+), 2 deletions(-) + +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc +@@ -81,7 +89,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> +@@ -163,7 +170,19 @@ + unsigned struct_old_utsname_sz = sizeof(struct old_utsname); + unsigned struct_oldold_utsname_sz = sizeof(struct oldold_utsname); + unsigned struct_itimerspec_sz = sizeof(struct itimerspec); +- 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; + #endif // SANITIZER_LINUX + + #if SANITIZER_LINUX && !SANITIZER_ANDROID +-- +2.9.3 diff --git a/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch b/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch new file mode 100644 index 0000000..46a219a --- /dev/null +++ b/4.9.4/gentoo/101_all_libsanitizer-libbacktrace-Werror.patch @@ -0,0 +1,17 @@ +libsanitizer/libbacktrace does not respect --disable-werror + +https://bugs.gentoo.org/667104 +--- a/libsanitizer/libbacktrace/Makefile.am ++++ b/libsanitizer/libbacktrace/Makefile.am +@@ -37,3 +37,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ + WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ +- -Wcast-qual -Werror ++ -Wcast-qual + C_WARN_FLAGS = $(WARN_FLAGS) -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition +--- a/libsanitizer/libbacktrace/Makefile.in ++++ b/libsanitizer/libbacktrace/Makefile.in +@@ -293,3 +293,3 @@ AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \ + WARN_FLAGS = -W -Wall -Wwrite-strings -Wmissing-format-attribute \ +- -Wcast-qual -Werror ++ -Wcast-qual + diff --git a/4.9.4/gentoo/README.history b/4.9.4/gentoo/README.history index 67c7a25..3ddedc0 100644 --- a/4.9.4/gentoo/README.history +++ b/4.9.4/gentoo/README.history @@ -1,5 +1,7 @@ 1.4 TODO + 99_all_remove-lieee.patch + + 100_all_avoid-ustat-glibc-2.28.patch + + 101_all_libsanitizer-libbacktrace-Werror.patch 1.3 12 Jan 2018 + 98_all_libjava-ucontext.patch |