[beignet] 02/04: drop unsafe -D__$(USER)__ flag

Andreas Beckmann anbe at moszumanska.debian.org
Sat Feb 7 13:14:19 UTC 2015


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

anbe pushed a commit to branch master
in repository beignet.

commit 947b8a123cd64dc26664f5e4b0cf7a631460c8c9
Author: Andreas Beckmann <anbe at debian.org>
Date:   Sat Feb 7 04:56:57 2015 +0100

    drop unsafe -D__$(USER)__ flag
---
 debian/changelog                                   |  3 +++
 .../patches/remove-unsafe-define-D__-USER-__.patch | 31 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 35 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c96a636..70261a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ beignet (1.0.1-1) UNRELEASED; urgency=medium
   * Update watch file.
   * Refresh patches.
   * llvm-search-order.patch: New. Prefer newer llvm versions.
+  * remove-unsafe-define-D__-USER-__.patch: New. Drop unsafe -D__$(USER)__
+    flag. Breaks on non-alpha-numerical chars ('-', '.') and usernames like
+    'asm', 'attribute', 'i386', 'x86_64', ...
 
   [ Rebecca N. Palmer ]
   * Use -Bsymbolic to make sure we jump to our LLVM and not mesa's.
diff --git a/debian/patches/remove-unsafe-define-D__-USER-__.patch b/debian/patches/remove-unsafe-define-D__-USER-__.patch
new file mode 100644
index 0000000..72758ec
--- /dev/null
+++ b/debian/patches/remove-unsafe-define-D__-USER-__.patch
@@ -0,0 +1,31 @@
+From 7da4f53e85091f913b311a3da34761bed94b2f1c Mon Sep 17 00:00:00 2001
+From: Andreas Beckmann <anbe at debian.org>
+Date: Sat, 7 Feb 2015 04:45:32 +0100
+Subject: [PATCH] remove unsafe define -D__$(USER)__
+
+funny things may happen with usernames like
+'asm', 'attribute', 'x86_64', 'i386', and so on
+
+this breaks on usernames with non-alnum chars ('-', '.')
+
+Signed-off-by: Andreas Beckmann <anbe at debian.org>
+---
+ CMakeLists.txt | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 01ec1d8..9c398e9 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -45,8 +45,6 @@ if (NOT BEIGNET_INSTALL_DIR)
+   set (BEIGNET_INSTALL_DIR "${LIB_INSTALL_DIR}/beignet/")
+ endif (NOT BEIGNET_INSTALL_DIR)
+ 
+-ADD_DEFINITIONS(-D__$(USER)__)
+-
+ # Force Release with debug info
+ if (NOT CMAKE_BUILD_TYPE)
+   set (CMAKE_BUILD_TYPE RelWithDebInfo)
+-- 
+2.1.4
+
diff --git a/debian/patches/series b/debian/patches/series
index 8483730..e7a80f3 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ Enable-test-debug.patch
 fix-compiler_fill_image_1d_array.patch
 fail-gracefully-cl_mem_allocate.patch
 llvm-search-order.patch
+remove-unsafe-define-D__-USER-__.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-commits mailing list