[pocl] 15/17: consistently terminate POCL_ABORT messages with a newline
Andreas Beckmann
anbe at moszumanska.debian.org
Sun Nov 26 03:19:51 UTC 2017
This is an automated email from the git hooks/post-receive script.
anbe pushed a commit to branch master
in repository pocl.
commit 517644ac2737b4cffa44c0fb834bdf70a659cc84
Author: Andreas Beckmann <anbe at debian.org>
Date: Sat Nov 25 07:32:26 2017 +0100
consistently terminate POCL_ABORT messages with a newline
---
.../consistent-newlines-in-POCL_ABORT.patch | 185 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 186 insertions(+)
diff --git a/debian/patches/consistent-newlines-in-POCL_ABORT.patch b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
new file mode 100644
index 0000000..fda8490
--- /dev/null
+++ b/debian/patches/consistent-newlines-in-POCL_ABORT.patch
@@ -0,0 +1,185 @@
+Author: Andreas Beckmann <anbe at debian.org>
+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()
+ /* 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].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_
+ {
+ hsa_status_string(status, &str);
+ POCL_MSG_PRINT2(func, line, "Error from HSA Runtime call:\n");
+- POCL_ABORT("%s", str);
++ POCL_ABORT("%s\n", str);
+ }
+ }
+
+@@ -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");
+ }
+
+ 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");
+ }
+ }
+
+@@ -422,7 +422,7 @@ pocl_tce_run
+ #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
+ d->restartProgram();
+ } catch (Exception &e) {
+ std::cerr << "error: " << e.errorMessage() << std::endl;
+- POCL_ABORT("error: Failed to load program to the TTA.");
++ POCL_ABORT("error: Failed to load program to the TTA.\n");
+ }
+
+ const TTAProgram::Program* prog = d->currentProgram;
+@@ -441,7 +441,7 @@ pocl_tce_run
+ try {
+ kernelAddr = globalScope.dataLabel(kernelMdSymbolName).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");
+ }
+ // 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_
+ {
+ if (posix_memalign (&target, ALIGNMENT, size) != 0)
+ {
+- POCL_ABORT ("Could not allocate memory.");
++ POCL_ABORT("Could not allocate memory.\n");
+ }
+ }
+
+@@ -670,7 +670,7 @@ pocl_tce_build_hash (void *data, SHA1_CT
+ 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);
+--- a/lib/CL/devices/tce/ttasim/ttasim.cc
++++ b/lib/CL/devices/tce/ttasim/ttasim.cc
+@@ -174,7 +174,7 @@ public:
+ const char *adf = strrchr(adfName, '/');
+ if (adf != NULL) adf++;
+ if (snprintf (dev_name, 256, "ttasim-%s", adf) < 0)
+- POCL_ABORT("Unable to generate the device name string.");
++ POCL_ABORT("Unable to generate the device name string.\n");
+ dev->long_name = strdup(dev_name);
+ ++device_count;
+
+@@ -476,7 +476,7 @@ pocl_ttasim_thread (void *p)
+
+ if (d->simulator.hadRuntimeError()) {
+ d->simulatorCLI.run();
+- POCL_ABORT("Runtime error in a ttasim device.");
++ POCL_ABORT("Runtime error in a ttasim device.\n");
+ }
+ } 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() {
+ if (Features["sse2"])
+ res = "sse2";
+ else
+- POCL_ABORT("Pocl on x86_64 requires at least SSE2");
++ POCL_ABORT("Pocl on x86_64 requires at least SSE2\n");
+ if (Features["ssse3"] && Features["cx16"])
+ res = "ssse3";
+ if (Features["sse4.1"] && Features["cx16"])
+@@ -1226,7 +1226,7 @@ static PassManager& kernel_compiler_pass
+ else
+ {
+ std::cerr << "Failed to create kernel compiler pass " << passes[i] << std::endl;
+- POCL_ABORT("FAIL");
++ POCL_ABORT("FAIL\n");
+ }
+ }
+ kernel_compiler_passes[device] = Passes;
+@@ -1343,7 +1343,7 @@ kernel_library
+ lib = ParseIRFile(kernellib_fallback.c_str(), Err, *GlobalContext());
+ }
+ else
+- POCL_ABORT("Kernel library file %s doesn't exist.", kernellib.c_str());
++ POCL_ABORT("Kernel library file %s doesn't exist.\n", kernellib.c_str());
+ }
+ assert (lib != NULL);
+ libs[device] = lib;
+@@ -1516,7 +1516,7 @@ void pocl_llvm_update_binaries (cl_progr
+
+ size_t n = content.size();
+ if (n < program->binary_sizes[i])
+- POCL_ABORT("binary size doesn't match the expected value");
++ POCL_ABORT("binary size doesn't match the expected value\n");
+ if (program->binaries[i])
+ POCL_MEM_FREE(program->binaries[i]);
+ 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()
+ 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);
+
+@@ -104,7 +104,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)
+- POCL_ABORT("failed to enlarge queue list!");
++ POCL_ABORT("failed to enlarge queue list!\n");
+ queue_list = resized;
+ queue_alloc += 256;
+ }
diff --git a/debian/patches/series b/debian/patches/series
index 0ca7feb..19aa4c7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,4 +6,5 @@ fix-tests-i386.patch
find-sys-cdefs-h.patch
glibc-2.23.patch
set-POCL_DEVICE_ADDRESS_BITS-before-use.patch
+consistent-newlines-in-POCL_ABORT.patch
libstdc++-7-dev.patch
--
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