This commit is contained in:
parent
8834ee8ac2
commit
fd9959a8d7
@ -1,112 +0,0 @@
|
|||||||
Index: projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h
|
|
||||||
===================================================================
|
|
||||||
--- projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h (revision 195441)
|
|
||||||
+++ projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h (revision 195442)
|
|
||||||
@@ -61,6 +61,14 @@
|
|
||||||
const unsigned struct___old_kernel_stat_sz = 32;
|
|
||||||
const unsigned struct_kernel_stat_sz = 64;
|
|
||||||
const unsigned struct_kernel_stat64_sz = 104;
|
|
||||||
+#elif defined(__powerpc__) && !defined(__powerpc64__)
|
|
||||||
+ const unsigned struct___old_kernel_stat_sz = 32;
|
|
||||||
+ const unsigned struct_kernel_stat_sz = 72;
|
|
||||||
+ const unsigned struct_kernel_stat64_sz = 104;
|
|
||||||
+#elif defined(__powerpc64__)
|
|
||||||
+ const unsigned struct___old_kernel_stat_sz = 0;
|
|
||||||
+ const unsigned struct_kernel_stat_sz = 144;
|
|
||||||
+ const unsigned struct_kernel_stat64_sz = 104;
|
|
||||||
#endif
|
|
||||||
const unsigned struct_io_event_sz = 32;
|
|
||||||
struct __sanitizer_perf_event_attr {
|
|
||||||
@@ -126,10 +134,15 @@
|
|
||||||
int gid;
|
|
||||||
int cuid;
|
|
||||||
int cgid;
|
|
||||||
+#ifdef __powerpc64__
|
|
||||||
+ unsigned mode;
|
|
||||||
+ unsigned __seq;
|
|
||||||
+#else
|
|
||||||
unsigned short mode;
|
|
||||||
unsigned short __pad1;
|
|
||||||
unsigned short __seq;
|
|
||||||
unsigned short __pad2;
|
|
||||||
+#endif
|
|
||||||
uptr __unused1;
|
|
||||||
uptr __unused2;
|
|
||||||
};
|
|
||||||
@@ -136,7 +149,9 @@
|
|
||||||
|
|
||||||
struct __sanitizer_shmid_ds {
|
|
||||||
__sanitizer_ipc_perm shm_perm;
|
|
||||||
+ #ifndef __powerpc__
|
|
||||||
uptr shm_segsz;
|
|
||||||
+ #endif
|
|
||||||
uptr shm_atime;
|
|
||||||
#ifndef _LP64
|
|
||||||
uptr __unused1;
|
|
||||||
@@ -149,6 +164,9 @@
|
|
||||||
#ifndef _LP64
|
|
||||||
uptr __unused3;
|
|
||||||
#endif
|
|
||||||
+ #ifdef __powerpc__
|
|
||||||
+ uptr shm_segsz;
|
|
||||||
+ #endif
|
|
||||||
int shm_cpid;
|
|
||||||
int shm_lpid;
|
|
||||||
uptr shm_nattch;
|
|
||||||
@@ -271,8 +289,15 @@
|
|
||||||
typedef unsigned short __sanitizer___kernel_gid_t;
|
|
||||||
typedef long __sanitizer___kernel_off_t;
|
|
||||||
#endif
|
|
||||||
+
|
|
||||||
+#if defined(__powerpc64__)
|
|
||||||
+ typedef unsigned int __sanitizer___kernel_old_uid_t;
|
|
||||||
+ typedef unsigned int __sanitizer___kernel_old_gid_t;
|
|
||||||
+#else
|
|
||||||
typedef unsigned short __sanitizer___kernel_old_uid_t;
|
|
||||||
typedef unsigned short __sanitizer___kernel_old_gid_t;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
typedef long long __sanitizer___kernel_loff_t;
|
|
||||||
typedef struct {
|
|
||||||
unsigned long fds_bits[1024 / (8 * sizeof(long))];
|
|
||||||
Index: projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc
|
|
||||||
===================================================================
|
|
||||||
--- projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc (revision 195441)
|
|
||||||
+++ projects/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc (revision 195442)
|
|
||||||
@@ -25,8 +25,25 @@
|
|
||||||
// For offsetof -> __builtin_offsetof definition.
|
|
||||||
#include <stddef.h>
|
|
||||||
|
|
||||||
+// With old kernels (and even new kernels on powerpc) asm/stat.h uses types that
|
|
||||||
+// are not defined anywhere in userspace headers. Fake them. This seems to work
|
|
||||||
+// fine with newer headers, too.
|
|
||||||
+#include <asm/posix_types.h>
|
|
||||||
+#define ino_t __kernel_ino_t
|
|
||||||
+#define mode_t __kernel_mode_t
|
|
||||||
+#define nlink_t __kernel_nlink_t
|
|
||||||
+#define uid_t __kernel_uid_t
|
|
||||||
+#define gid_t __kernel_gid_t
|
|
||||||
+#define off_t __kernel_off_t
|
|
||||||
// This header seems to contain the definitions of _kernel_ stat* structs.
|
|
||||||
#include <asm/stat.h>
|
|
||||||
+#undef ino_t
|
|
||||||
+#undef mode_t
|
|
||||||
+#undef nlink_t
|
|
||||||
+#undef uid_t
|
|
||||||
+#undef gid_t
|
|
||||||
+#undef off_t
|
|
||||||
+
|
|
||||||
#include <linux/aio_abi.h>
|
|
||||||
|
|
||||||
#if SANITIZER_ANDROID
|
|
||||||
@@ -43,7 +60,10 @@
|
|
||||||
unsigned struct_statfs64_sz = sizeof(struct statfs64);
|
|
||||||
} // namespace __sanitizer
|
|
||||||
|
|
||||||
+#if !defined(__powerpc64__)
|
|
||||||
COMPILER_CHECK(struct___old_kernel_stat_sz == sizeof(struct __old_kernel_stat));
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
COMPILER_CHECK(struct_kernel_stat_sz == sizeof(struct stat));
|
|
||||||
|
|
||||||
#if defined(__i386__)
|
|
@ -43,7 +43,6 @@ Patch7: cmake-host-triple.patch
|
|||||||
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
# PATCH-FIX-OPENSUSE aarch64-suse-support.patch -- Enable AArch64 suse toolchain support
|
||||||
Patch8: aarch64-suse-support.patch
|
Patch8: aarch64-suse-support.patch
|
||||||
Patch9: arm-remove-xfails.diff
|
Patch9: arm-remove-xfails.diff
|
||||||
Patch10: fix-powerpc-headers.patch
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
BuildRequires: autoconf
|
BuildRequires: autoconf
|
||||||
BuildRequires: automake
|
BuildRequires: automake
|
||||||
@ -152,7 +151,6 @@ This package contains vim plugins for LLVM like syntax highlighting.
|
|||||||
%patch7 -p1
|
%patch7 -p1
|
||||||
%patch8 -p1
|
%patch8 -p1
|
||||||
%patch9
|
%patch9
|
||||||
%patch10
|
|
||||||
|
|
||||||
# We hardcode i586
|
# We hardcode i586
|
||||||
rm tools/clang/test/Driver/x86_features.c
|
rm tools/clang/test/Driver/x86_features.c
|
||||||
@ -216,6 +214,7 @@ pushd stage1
|
|||||||
%ifarch ppc64
|
%ifarch ppc64
|
||||||
%define host_triple powerpc64-suse-linux
|
%define host_triple powerpc64-suse-linux
|
||||||
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
sed -i s,'${CMAKE_SYSTEM_PROCESSOR}','"PowerPC"',g ../cmake/modules/AddLLVM.cmake
|
||||||
|
rm -rf ../projects/compiler-rt
|
||||||
%endif
|
%endif
|
||||||
%ifarch s390x
|
%ifarch s390x
|
||||||
%define host_triple s390x-suse-linux
|
%define host_triple s390x-suse-linux
|
||||||
@ -434,7 +433,7 @@ rm -rf %{buildroot}/usr/share/llvm/cmake
|
|||||||
%{_libdir}/bfd-plugins/
|
%{_libdir}/bfd-plugins/
|
||||||
%endif
|
%endif
|
||||||
%{_libdir}/clang
|
%{_libdir}/clang
|
||||||
%ifnarch %arm aarch64 s390 s390x
|
%ifnarch %arm aarch64 ppc64 s390 s390x
|
||||||
%{_libdir}/clang/%{_release_version}/lib/linux/
|
%{_libdir}/clang/%{_release_version}/lib/linux/
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user