summaryrefslogtreecommitdiff
path: root/debian/patches/openmp
diff options
context:
space:
mode:
Diffstat (limited to 'debian/patches/openmp')
-rw-r--r--debian/patches/openmp/bootstrap-with-openmp-version-export-missing.diff14
-rw-r--r--debian/patches/openmp/openmp-check-execstack.diff14
-rw-r--r--debian/patches/openmp/openmp-mips-affinity.patch56
3 files changed, 84 insertions, 0 deletions
diff --git a/debian/patches/openmp/bootstrap-with-openmp-version-export-missing.diff b/debian/patches/openmp/bootstrap-with-openmp-version-export-missing.diff
new file mode 100644
index 0000000..f503df2
--- /dev/null
+++ b/debian/patches/openmp/bootstrap-with-openmp-version-export-missing.diff
@@ -0,0 +1,14 @@
+Index: llvm-toolchain-7-7/openmp/runtime/src/CMakeLists.txt
+===================================================================
+--- llvm-toolchain-7-7.orig/openmp/runtime/src/CMakeLists.txt
++++ llvm-toolchain-7-7/openmp/runtime/src/CMakeLists.txt
+@@ -174,7 +174,8 @@ endif()
+
+ # Linking command will include libraries in LIBOMP_CONFIGURED_LIBFLAGS
+ libomp_get_libflags(LIBOMP_CONFIGURED_LIBFLAGS)
+-target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS})
++target_link_libraries(omp ${LIBOMP_CONFIGURED_LIBFLAGS} ${CMAKE_DL_LIBS}
++ "-Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/exports_so.txt")
+
+ # Create *.inc before compiling any sources
+ # objects depend on : .inc files
diff --git a/debian/patches/openmp/openmp-check-execstack.diff b/debian/patches/openmp/openmp-check-execstack.diff
new file mode 100644
index 0000000..5bfbc2c
--- /dev/null
+++ b/debian/patches/openmp/openmp-check-execstack.diff
@@ -0,0 +1,14 @@
+Index: llvm-toolchain-snapshot_7~svn335949/openmp/runtime/tools/check-execstack.pl
+===================================================================
+--- llvm-toolchain-snapshot_7~svn335949.orig/openmp/runtime/tools/check-execstack.pl
++++ llvm-toolchain-snapshot_7~svn335949/openmp/runtime/tools/check-execstack.pl
+@@ -46,7 +46,8 @@ sub execstack($) {
+ # GNU_STACK 0x000000 0x00000000 0x00000000 0x00000 0x00000 RWE 0x4
+ # Linux* OS Intel(R) 64:
+ # GNU_STACK 0x000000 0x0000000000000000 0x0000000000000000 0x000000 0x000000 RWE 0x8
+- if ( $stack[ 0 ] !~ m{\A\s*(?:GNU_)?STACK(?:\s+0x[0-9a-f]+){5}\s+([R ][W ][E ])\s+0x[0-9a-f]+\s*\z} ) {
++# if ( $stack[ 0 ] !~ m{\A\s*(?:GNU_)?STACK(?:\s+0x[0-9a-f]+){5}\s+([R ][W ][E ])\s+0x[0-9a-f]+\s*\z} ) {
++ if ( $stack[ 0 ] !~ m{\A\s*(?:GNU_)?STACK(?:\s+0x[0-9a-f]+){5}\s+([R ][W ][E ])\s+0(?:x[0-9a-f]+)*\s*\z} ) {
+ runtime_error( "$file: Cannot parse stack segment line:", ">>> $stack[ 0 ]" );
+ }; # if
+ my $attrs = $1;
diff --git a/debian/patches/openmp/openmp-mips-affinity.patch b/debian/patches/openmp/openmp-mips-affinity.patch
new file mode 100644
index 0000000..7f3eb13
--- /dev/null
+++ b/debian/patches/openmp/openmp-mips-affinity.patch
@@ -0,0 +1,56 @@
+Index: llvm-toolchain-snapshot_8~svn342269/openmp/runtime/src/kmp_affinity.h
+===================================================================
+--- llvm-toolchain-snapshot_8~svn342269.orig/openmp/runtime/src/kmp_affinity.h
++++ llvm-toolchain-snapshot_8~svn342269/openmp/runtime/src/kmp_affinity.h
+@@ -211,28 +211,29 @@ public:
+ #elif __NR_sched_getaffinity != 223
+ #error Wrong code for getaffinity system call.
+ #endif /* __NR_sched_getaffinity */
+-#elif KMP_ARCH_MIPS
+-#ifndef __NR_sched_setaffinity
+-#define __NR_sched_setaffinity 4239
+-#elif __NR_sched_setaffinity != 4239
+-#error Wrong code for setaffinity system call.
+-#endif /* __NR_sched_setaffinity */
+-#ifndef __NR_sched_getaffinity
+-#define __NR_sched_getaffinity 4240
+-#elif __NR_sched_getaffinity != 4240
+-#error Wrong code for getaffinity system call.
+-#endif /* __NR_sched_getaffinity */
+-#elif KMP_ARCH_MIPS64
+-#ifndef __NR_sched_setaffinity
+-#define __NR_sched_setaffinity 5195
+-#elif __NR_sched_setaffinity != 5195
+-#error Wrong code for setaffinity system call.
+-#endif /* __NR_sched_setaffinity */
+-#ifndef __NR_sched_getaffinity
+-#define __NR_sched_getaffinity 5196
+-#elif __NR_sched_getaffinity != 5196
+-#error Wrong code for getaffinity system call.
+-#endif /* __NR_sched_getaffinity */
++# elif KMP_ARCH_MIPS
++# ifndef __NR_sched_setaffinity
++# define __NR_sched_setaffinity 4239
++# elif __NR_sched_setaffinity != 4239
++# error Wrong code for setaffinity system call.
++# endif /* __NR_sched_setaffinity */
++# ifndef __NR_sched_getaffinity
++# define __NR_sched_getaffinity 4240
++# elif __NR_sched_getaffinity != 4240
++# error Wrong code for getaffinity system call.
++# endif /* __NR_sched_getaffinity */
++# elif KMP_ARCH_MIPS64
++# ifndef __NR_sched_setaffinity
++# define __NR_sched_setaffinity 5195
++# elif __NR_sched_setaffinity != 5195
++# error Wrong code for setaffinity system call.
++# endif /* __NR_sched_setaffinity */
++# ifndef __NR_sched_getaffinity
++# define __NR_sched_getaffinity 5196
++# elif __NR_sched_getaffinity != 5196
++# error Wrong code for getaffinity system call.
++# endif /* __NR_sched_getaffinity */
++# else
+ #error Unknown or unsupported architecture
+ #endif /* KMP_ARCH_* */
+ class KMPNativeAffinity : public KMPAffinity {