[pocl] 03/04: Update patch series for upstream version 0.14

Raphaël Hertzog hertzog at moszumanska.debian.org
Tue Dec 5 17:33:21 UTC 2017


This is an automated email from the git hooks/post-receive script.

hertzog pushed a commit to branch 0.14
in repository pocl.

commit b5c2bfb76f957a53dbacd608b30efb5c20e9163c
Author: Raphaël Hertzog <hertzog at debian.org>
Date:   Tue Dec 5 18:15:08 2017 +0100

    Update patch series for upstream version 0.14
---
 debian/changelog                                   |   5 +
 debian/patches/cmake-no-fno-rtti.patch             |  20 ----
 debian/patches/cmake-no-get_cpu_name.patch         |  10 +-
 .../consistent-newlines-in-POCL_ABORT.patch        | 106 ++++++++++-----------
 debian/patches/do-not-export-clang-symbols.patch   |  12 +--
 debian/patches/fix-tests-i386.patch                |  11 ---
 debian/patches/series                              |   1 -
 .../set-POCL_DEVICE_ADDRESS_BITS-before-use.patch  |  18 ++--
 8 files changed, 69 insertions(+), 114 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 5a01091..355d7ab 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,11 @@ pocl (0.14-1) UNRELEASED; urgency=medium
 
   [ Raphaël Hertzog ]
   * Switch to cmake build system (thanks to James Price for the patch).
+  * Refresh all patches:
+    - cmake-no-fno-rtti.patch, no longer needed.
+    - do-not-export-clang-symbols.patch, drop automake part cmake is
+      the only build system supported now.
+    - fix-tests-i386.patch, half of the patch got merged upstream.
 
  -- Andreas Tille <tille at debian.org>  Tue, 21 Nov 2017 08:23:34 +0100
 
diff --git a/debian/patches/cmake-no-fno-rtti.patch b/debian/patches/cmake-no-fno-rtti.patch
deleted file mode 100644
index e9667ad..0000000
--- a/debian/patches/cmake-no-fno-rtti.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-Author: Andreas Beckmann <anbe at debian.org>
-Description: do not set -fno-rtti under CMake
- to make the build better mimic the autotools build and to
- not generate symbol differences
-
---- a/cmake/LLVM.cmake
-+++ b/cmake/LLVM.cmake
-@@ -176,9 +176,9 @@ string(REPLACE " -pedantic" "" LLVM_CXXF
- # - '-fno-rtti' is a work-around for llvm bug 14200
- # Which according to bug report has been fixed in llvm 3.7
- # sadly, that bugreport is mistaken, it's not fixed in 3.7
--if (NOT MSVC)
--  set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -fno-rtti")
--endif()
-+#if (NOT MSVC)
-+#  set(LLVM_CXXFLAGS "${LLVM_CXXFLAGS} -fno-rtti")
-+#endif()
- 
- 
- # Llvm-config may be installed or it might be used from build directory, in which case
diff --git a/debian/patches/cmake-no-get_cpu_name.patch b/debian/patches/cmake-no-get_cpu_name.patch
index 886b94f..fa853f8 100644
--- a/debian/patches/cmake-no-get_cpu_name.patch
+++ b/debian/patches/cmake-no-get_cpu_name.patch
@@ -26,10 +26,10 @@ Description: disable get_cpu_name() under CMake
 
 --- a/lib/CL/devices/basic/basic.c
 +++ b/lib/CL/devices/basic/basic.c
-@@ -332,11 +332,11 @@ pocl_basic_init_device_infos(struct _cl_
-   dev->extensions = HOST_DEVICE_EXTENSIONS;
+@@ -363,11 +363,11 @@ pocl_basic_init_device_infos(struct _cl_
  
    dev->llvm_target_triplet = OCL_KERNEL_TARGET;
+ 
 -#ifdef POCL_BUILT_WITH_CMAKE
 -  dev->llvm_cpu = get_cpu_name();
 -#else
@@ -39,6 +39,6 @@ Description: disable get_cpu_name() under CMake
    dev->llvm_cpu = OCL_KERNEL_TARGET_CPU;
 -#endif
 +//#endif
-   dev->has_64bit_long = 1;
-   dev->autolocals_to_args = 1;
- }
+ 
+ #else
+   dev->llvm_cpu = NULL;
diff --git a/debian/patches/consistent-newlines-in-POCL_ABORT.patch b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
index fda8490..cef9079 100644
--- a/debian/patches/consistent-newlines-in-POCL_ABORT.patch
+++ b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
@@ -3,18 +3,18 @@ Description: consistently terminate POCL_ABORT messages with a newline
 
 --- a/lib/CL/devices/devices.c
 +++ b/lib/CL/devices/devices.c
-@@ -257,7 +257,7 @@ pocl_init_devices()
+@@ -264,7 +264,7 @@ pocl_init_devices()
            /* Check if there are device-specific parameters set in the
               POCL_DEVICEn_PARAMETERS env. */
            if (snprintf (env_name, 1024, "POCL_%s%d_PARAMETERS", dev_name, j) < 0)
 -            POCL_ABORT("Unable to generate the env string.");
 +            POCL_ABORT("Unable to generate the env string.\n");
- 
+           pocl_devices[dev_index].dev_id = dev_index;
            pocl_devices[dev_index].ops->init(&pocl_devices[dev_index], getenv(env_name));
  
 --- a/lib/CL/devices/hsa/pocl-hsa.c
 +++ b/lib/CL/devices/hsa/pocl-hsa.c
-@@ -195,7 +195,7 @@ static void pocl_hsa_abort_on_error(hsa_
+@@ -240,7 +240,7 @@ pocl_hsa_abort_on_hsa_error(hsa_status_t
      {
        hsa_status_string(status, &str);
        POCL_MSG_PRINT2(func, line, "Error from HSA Runtime call:\n");
@@ -23,36 +23,45 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
  }
  
-@@ -333,7 +333,7 @@ get_hsa_device_features(char* dev_name,
-                "constant buffer size etc), and there's no way to get"
-                "the required stuff from HSA API. Please create a "
-                "new entry with the information in supported_hsa_devices,"
--               "and send a note/patch to pocl developers. Thanks!");
-+               "and send a note/patch to pocl developers. Thanks!\n");
+@@ -259,7 +259,7 @@ pocl_hsa_abort_on_pthread_error(int stat
+   if (status != 0)
+     {
+       POCL_MSG_PRINT2(func, line, "Error from pthread call:\n");
+-      POCL_ABORT("%s", strerror(status));
++      POCL_ABORT("%s\n", strerror(status));
+     }
  }
  
- void
---- a/lib/CL/devices/tce/tce_common.cc
-+++ b/lib/CL/devices/tce/tce_common.cc
-@@ -124,7 +124,7 @@ TCEDevice::findDataMemoryAddresses() {
-   try {
-     commandQueueAddr = globalScope.dataLabel("kernel_command").address().location();
-   } catch (const KeyNotFound& e) {
--    POCL_ABORT ("Could not find the shared data structures from the device binary.");
-+    POCL_ABORT("Could not find the shared data structures from the device binary.\n");
-   }    
+@@ -435,7 +435,7 @@ get_hsa_device_features(char* dev_name,
+ 		 "constant buffer size etc), and there's no way to get all "
+ 		 "the required info from HSA API. Please create a "
+ 		 "new entry with the information in supported_hsa_devices, "
+-		 "and send a note/patch to pocl developers. Thanks!");
++		 "and send a note/patch to pocl developers. Thanks!\n");
+     }
  }
  
-@@ -422,7 +422,7 @@ pocl_tce_run
+@@ -1092,7 +1092,7 @@ pocl_hsa_compile_kernel (_cl_command_nod
+       d->kernel_cache_lastptr++;
+     }
+   else
+-    POCL_ABORT("kernel cache full");
++    POCL_ABORT("kernel cache full\n");
+ 
+   hsa_executable_symbol_t kernel_symbol;
+ 
+--- a/lib/CL/devices/tce/tce_common.cc
++++ b/lib/CL/devices/tce/tce_common.cc
+@@ -434,7 +434,7 @@ pocl_tce_compile_kernel(_cl_command_node
  #endif
        error = system(buildCmd.c_str());
        if (error != 0)
 -        POCL_ABORT("Error while running tcecc.");
 +        POCL_ABORT("Error while running tcecc.\n");
        }
-     
-     try {
-@@ -430,7 +430,7 @@ pocl_tce_run
+   }
+ }
+@@ -465,7 +465,7 @@ pocl_tce_run(void *data, _cl_command_nod
        d->restartProgram();
      } catch (Exception &e) {
        std::cerr << "error: " << e.errorMessage() << std::endl;
@@ -61,7 +70,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
  
      const TTAProgram::Program* prog = d->currentProgram;
-@@ -441,7 +441,7 @@ pocl_tce_run
+@@ -476,7 +476,7 @@ pocl_tce_run(void *data, _cl_command_nod
      try {
        kernelAddr = globalScope.dataLabel(kernelMdSymbolName).address().location();
      } catch (const KeyNotFound& e) {
@@ -70,7 +79,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
      // cache the currently device loaded kernel info 
      d->updateCurrentKernel(&(cmd->command.run), kernelAddr);
-@@ -605,7 +605,7 @@ pocl_tce_map_mem (void *data, void *buf_
+@@ -641,7 +641,7 @@ pocl_tce_map_mem (void *data, void *buf_
      {
          if (posix_memalign (&target, ALIGNMENT, size) != 0)
          {
@@ -79,18 +88,18 @@ Description: consistently terminate POCL_ABORT messages with a newline
          }
      }
  
-@@ -670,7 +670,7 @@ pocl_tce_build_hash (void *data, SHA1_CT
+@@ -705,7 +705,7 @@ pocl_tce_build_hash (cl_device_id device
    fseek (adf_file, 0, SEEK_SET);
    adf_data = (uint8_t*)malloc (size);
    if (fread (adf_data, 1, size, adf_file) == 0)
 -      POCL_ABORT ("Could not read ADF.");
-+      POCL_ABORT("Could not read ADF.\n");
-   
-   //TCEString machine_hash = tce->dev->hash();
-   pocl_SHA1_Update (build_hash, adf_data, size);
++      POCL_ABORT ("Could not read ADF.\n");
+ 
+   SHA1_CTX ctx;
+   uint8_t bin_dig[SHA1_DIGEST_SIZE];
 --- a/lib/CL/devices/tce/ttasim/ttasim.cc
 +++ b/lib/CL/devices/tce/ttasim/ttasim.cc
-@@ -174,7 +174,7 @@ public:
+@@ -187,7 +187,7 @@ public:
      const char *adf = strrchr(adfName, '/');
      if (adf != NULL) adf++;
      if (snprintf (dev_name, 256, "ttasim-%s", adf) < 0)
@@ -99,7 +108,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      dev->long_name = strdup(dev_name);  
      ++device_count;
  
-@@ -476,7 +476,7 @@ pocl_ttasim_thread (void *p)
+@@ -489,7 +489,7 @@ pocl_ttasim_thread (void *p)
  
          if (d->simulator.hadRuntimeError()) {
              d->simulatorCLI.run();
@@ -108,26 +117,9 @@ Description: consistently terminate POCL_ABORT messages with a newline
          }
      } while (false);
    } while (true);
---- a/lib/CL/pocl_cache.c
-+++ b/lib/CL/pocl_cache.c
-@@ -501,12 +501,12 @@ void pocl_cache_init_topdir() {
-     }
- 
-     if (needed >= POCL_FILENAME_LENGTH) {
--        POCL_ABORT("pocl: cache path longer than maximum filename length");
-+        POCL_ABORT("pocl: cache path longer than maximum filename length\n");
-     }
- 
-     assert(strlen(cache_topdir) > 0);
-     if (pocl_mkdir_p(cache_topdir))
--        POCL_ABORT("Could not create topdir for cache");
-+        POCL_ABORT("Could not create topdir for cache\n");
-     cache_topdir_initialized = 1;
- 
- }
 --- a/lib/CL/pocl_llvm_api.cc
 +++ b/lib/CL/pocl_llvm_api.cc
-@@ -907,7 +907,7 @@ const char* getX86KernelLibName() {
+@@ -1187,7 +1187,7 @@ static const char* getX86KernelLibName()
    if (Features["sse2"])
      res = "sse2";
    else
@@ -136,7 +128,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
    if (Features["ssse3"] && Features["cx16"])
      res = "ssse3";
    if (Features["sse4.1"] && Features["cx16"])
-@@ -1226,7 +1226,7 @@ static PassManager& kernel_compiler_pass
+@@ -1523,7 +1523,7 @@ static PassManager& kernel_compiler_pass
        else
          {
            std::cerr << "Failed to create kernel compiler pass " << passes[i] << std::endl;
@@ -144,8 +136,8 @@ Description: consistently terminate POCL_ABORT messages with a newline
 +          POCL_ABORT("FAIL\n");
          }
      }
-   kernel_compiler_passes[device] = Passes;
-@@ -1343,7 +1343,7 @@ kernel_library
+ 
+@@ -1643,7 +1643,7 @@ kernel_library
            lib = ParseIRFile(kernellib_fallback.c_str(), Err, *GlobalContext());
          }
        else
@@ -154,7 +146,7 @@ Description: consistently terminate POCL_ABORT messages with a newline
      }
    assert (lib != NULL);
    libs[device] = lib;
-@@ -1516,7 +1516,7 @@ void pocl_llvm_update_binaries (cl_progr
+@@ -1823,7 +1823,7 @@ void pocl_llvm_update_binaries (cl_progr
  
        size_t n = content.size();
        if (n < program->binary_sizes[i])
@@ -165,16 +157,16 @@ Description: consistently terminate POCL_ABORT messages with a newline
        program->binaries[i] = (unsigned char *) malloc(n);
 --- a/lib/CL/pocl_queue_util.c
 +++ b/lib/CL/pocl_queue_util.c
-@@ -61,7 +61,7 @@ void pocl_init_queue_list()
+@@ -67,7 +67,7 @@ void pocl_init_queue_list()
    queue_list = calloc(queue_alloc, sizeof(cl_command_queue));
  
    if (!queue_list)
 -    POCL_ABORT("unable to allocate queue list!");
 +    POCL_ABORT("unable to allocate queue list!\n");
  
-   atexit(pocl_finish_all_queues);
+   //atexit(pocl_finish_all_queues);
  
-@@ -104,7 +104,7 @@ void pocl_queue_list_insert(cl_command_q
+@@ -111,7 +111,7 @@ void pocl_queue_list_insert(cl_command_q
      // compaction failed to give us room
      cl_command_queue *resized = realloc(queue_list, queue_alloc + 256);
      if (!resized)
diff --git a/debian/patches/do-not-export-clang-symbols.patch b/debian/patches/do-not-export-clang-symbols.patch
index 033c822..97c5292 100644
--- a/debian/patches/do-not-export-clang-symbols.patch
+++ b/debian/patches/do-not-export-clang-symbols.patch
@@ -3,7 +3,7 @@ Description: use --exclude-libs to not export symbols from static clang librarie
 
 --- a/cmake/LLVM.cmake
 +++ b/cmake/LLVM.cmake
-@@ -198,6 +198,7 @@ set(CLANG_LIBNAMES clangFrontendTool cla
+@@ -203,6 +203,7 @@ set(CLANG_LIBNAMES clangFrontendTool cla
  foreach(LIBNAME ${CLANG_LIBNAMES})
    find_library(C_LIBFILE_${LIBNAME} NAMES "${LIBNAME}" HINTS "${LLVM_LIBDIR}")
    list(APPEND CLANG_LIBFILES "${C_LIBFILE_${LIBNAME}}")
@@ -11,13 +11,3 @@ Description: use --exclude-libs to not export symbols from static clang librarie
  endforeach()
  
  # With Visual Studio llvm-config gives invalid list of static libs (libXXXX.a instead of XXXX.lib)
---- a/lib/CL/Makefile.am
-+++ b/lib/CL/Makefile.am
-@@ -187,6 +187,7 @@ libpocl_la_LDFLAGS += @LLVM_LDFLAGS@
- AM_CXXFLAGS = @PTHREAD_CFLAGS@ @LLVM_CXX_FLAGS@
- 
- libpocl_la_LDFLAGS += -L${top_builddir}/lib/CL/ @ICD_LD_FLAGS@
-+libpocl_la_LDFLAGS += -Wl,--exclude-libs,libclangFrontend:libclangDriver:libclangParse:libclangSema:libclangEdit:libclangLex:libclangSerialization:libclangAST:libclangBasic:libclangFrontendTool:libclangRewriteFrontend:libclangStaticAnalyzerFrontend:libclangStaticAnalyzerCore:libclangAnalysis:libclangCodeGen:libclangASTMatchers
- libpocl_la_LIBADD += libpoclllvm.la
- libpocl_la_LIBADD += ${top_builddir}/lib/llvmopencl/libllvmpasses.la
- libpocl_la_LIBADD += -lclangFrontend -lclangDriver -lclangParse -lclangSema -lclangEdit -lclangLex -lclangSerialization
diff --git a/debian/patches/fix-tests-i386.patch b/debian/patches/fix-tests-i386.patch
index 5a940fc..accf7b8 100644
--- a/debian/patches/fix-tests-i386.patch
+++ b/debian/patches/fix-tests-i386.patch
@@ -12,14 +12,3 @@ Description: also skip test on i586 CPU
  AT_XFAIL_IF([egrep -q "#define LLVM_3_2|#define LLVM_3_3" $abs_top_builddir/config.h])
  AT_KEYWORDS([printf])
  AT_CHECK_UNQUOTED([$abs_top_builddir/tests/kernel/kernel test_printf], 0,
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -42,7 +42,7 @@ elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "a
-   set(ARMV7 1)
- elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "armv6")
-   set(ARMV6 1)
--elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i386|AMD64|x86_64)")
-+elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "(i.86|AMD64|x86_64)")
-   if(POCL_DEVICE_ADDRESS_BITS MATCHES "32")
-     set(I386 1)
-   else()
diff --git a/debian/patches/series b/debian/patches/series
index 8090a38..24a4ab1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,6 +6,5 @@ set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
 consistent-newlines-in-POCL_ABORT.patch
 do-not-export-clang-symbols.patch
 libstdc++-7-dev.patch
-cmake-no-fno-rtti.patch
 cmake-no-get_cpu_name.patch
 cmake-forcibly-link-regtests-with-pthread.patch
diff --git a/debian/patches/set-POCL_DEVICE_ADDRESS_BITS-before-use.patch b/debian/patches/set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
index caae3d5..b2e18cc 100644
--- a/debian/patches/set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
+++ b/debian/patches/set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
@@ -4,9 +4,9 @@ Description: set POCL_DEVICE_ADDRESS_BITS before using it
 
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
-@@ -32,6 +32,18 @@ set(VERSION_SUFFIX "")
- set(VERSION_STRING ${MAJOR_VERSION}.${MINOR_VERSION}${VERSION_SUFFIX})
- set(POCL_VERSION ${VERSION_STRING})
+@@ -58,6 +58,18 @@ else()
+   set(ENABLE_ASAN 0)
+ endif()
  
 +##########################################################
 +
@@ -23,10 +23,12 @@ Description: set POCL_DEVICE_ADDRESS_BITS before using it
  ##################################################################################
  
  if(CMAKE_SYSTEM_PROCESSOR MATCHES "ppc")
-@@ -836,19 +848,6 @@ endif()
+@@ -861,19 +873,6 @@ else()
+ endif()
  
- ##########################################################
  
+-##########################################################
+-
 -# POCL_DEVICE_ADDRESS_BITS
 -# TODO rename to HOST addess bits
 -if(CMAKE_SIZEOF_VOID_P EQUAL 8)
@@ -38,8 +40,6 @@ Description: set POCL_DEVICE_ADDRESS_BITS before using it
 -endif()
 -
 -
--##########################################################
--
+ ##########################################################
+ 
  
- # cmake docs:
- # SOVERSION: What version number is this target.

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/pocl.git



More information about the Pkg-opencl-commits mailing list