[packages/llvm-libclc] - updated to latest, building snap - version changed to 0.1.0
baggins
baggins at pld-linux.org
Mon Jul 27 00:02:30 CEST 2015
commit 1976bba8b7c88a69d7e755b97c33efb162913b5f
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Mon Jul 27 00:01:55 2015 +0200
- updated to latest, building snap
- version changed to 0.1.0
build.patch | 20 +++++
libclc-better-FHS-compliance.patch | 137 -------------------------------
libclc-r600-support.patch | 156 ------------------------------------
libclc-support-for-overriding.patch | 47 -----------
llvm-libclc.spec | 12 +--
5 files changed, 24 insertions(+), 348 deletions(-)
---
diff --git a/llvm-libclc.spec b/llvm-libclc.spec
index 2c9b5d1..aa33b55 100644
--- a/llvm-libclc.spec
+++ b/llvm-libclc.spec
@@ -5,17 +5,15 @@
Summary: OpenCL C programming language library implementation
Summary(pl.UTF-8): Implementacja biblioteki języka programowania OpenCL C
Name: llvm-libclc
-Version: 0.0.1
-%define snap 20130101
+Version: 0.1.0
+%define snap 20150710
Release: 0.%{snap}.1
License: BSD-like or MIT
Group: Libraries
# git clone http://llvm.org/git/libclc.git
Source0: libclc.tar.xz
-# Source0-md5: 19eaa8751e6fcbf198ffdb07ebafe214
-Patch0: libclc-better-FHS-compliance.patch
-Patch1: libclc-support-for-overriding.patch
-Patch2: libclc-r600-support.patch
+# Source0-md5: 223fb33e939258ff69462d37cd7c8897
+Patch0: build.patch
URL: http://libclc.llvm.org/
BuildRequires: clang >= 3.2
BuildRequires: llvm-devel >= 3.2
@@ -65,8 +63,6 @@ Clang.
%prep
%setup -q -n libclc
%patch0 -p1
-%patch1 -p1
-%patch2 -p1
%build
./configure.py \
diff --git a/build.patch b/build.patch
new file mode 100644
index 0000000..bce98dc
--- /dev/null
+++ b/build.patch
@@ -0,0 +1,20 @@
+diff --git a/utils/prepare-builtins.cpp b/utils/prepare-builtins.cpp
+index a3c3383..afbc6c0 100644
+--- a/utils/prepare-builtins.cpp
++++ b/utils/prepare-builtins.cpp
+@@ -17,12 +17,12 @@
+ using namespace llvm;
+
+ static cl::opt<std::string>
+-InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
+-
+-static cl::opt<std::string>
+ OutputFilename("o", cl::desc("Output filename"),
+ cl::value_desc("filename"));
+
++static cl::opt<std::string>
++InputFilename(cl::Positional, cl::desc("<input bitcode>"), cl::init("-"));
++
+ int main(int argc, char **argv) {
+ LLVMContext &Context = getGlobalContext();
+ llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
diff --git a/libclc-better-FHS-compliance.patch b/libclc-better-FHS-compliance.patch
deleted file mode 100644
index 2b38889..0000000
--- a/libclc-better-FHS-compliance.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 3db1ffbd2f14f8b110e9949b93525f527983b612 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bernhard=20Rosenkr=E4nzer?= <bero at lindev.ch>
-Date: Sat, 12 Jan 2013 03:51:06 +0100
-Subject: [PATCH 1/3] Better FHS compliance
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Based on:
-http://www.pcc.me.uk/pipermail/libclc-dev/2012-December/000053.html
-
-From: Johannes Obermayr <johannesobermayr at gmx.de>
-Signed-off-by: Tom Stellard <tom at stellard.net>
-Signed-off-by: Bernhard Rosenkr�nzer <bero at lindev.ch>
----
- configure.py | 52 ++++++++++++++++++++++++++++++++++++++--------------
- 1 file changed, 38 insertions(+), 14 deletions(-)
-
-diff --git a/configure.py b/configure.py
-index 9ae49b7..8d1c2c5 100755
---- a/configure.py
-+++ b/configure.py
-@@ -4,6 +4,10 @@ def c_compiler_rule(b, name, description, compiler, flags):
- command = "%s -MMD -MF $out.d %s -c -o $out $in" % (compiler, flags)
- b.rule(name, command, description + " $out", depfile="$out.d")
-
-+version_major = 0
-+version_minor = 0
-+version_patch = 1
-+
- from optparse import OptionParser
- import os
- from subprocess import *
-@@ -19,12 +23,34 @@ p.add_option('--with-llvm-config', metavar='PATH',
- help='use given llvm-config script')
- p.add_option('--prefix', metavar='PATH',
- help='install to given prefix')
-+p.add_option('--libexecdir', metavar='PATH',
-+ help='install *.bc to given dir')
-+p.add_option('--includedir', metavar='PATH',
-+ help='install include files to given dir')
-+p.add_option('--pkgconfigdir', metavar='PATH',
-+ help='install libclc.pc to given dir')
- p.add_option('-g', metavar='GENERATOR', default='make',
- help='use given generator (default: make)')
- (options, args) = p.parse_args()
-
- llvm_config_exe = options.with_llvm_config or "llvm-config"
-
-+prefix = options.prefix
-+if not prefix:
-+ prefix = '/usr/local'
-+
-+libexecdir = options.libexecdir
-+if not libexecdir:
-+ libexecdir = os.path.join(prefix, 'lib/clc')
-+
-+includedir = options.includedir
-+if not includedir:
-+ includedir = os.path.join(prefix, 'include')
-+
-+pkgconfigdir = options.pkgconfigdir
-+if not pkgconfigdir:
-+ pkgconfigdir = os.path.join(prefix, 'lib/pkgconfig')
-+
- def llvm_config(args):
- try:
- proc = Popen([llvm_config_exe] + args, stdout=PIPE)
-@@ -58,8 +84,8 @@ b.rule("LLVM_LINK", command = llvm_link + " -o $out $in",
- b.rule("OPT", command = llvm_opt + " -O3 -o $out $in",
- description = 'OPT $out')
-
--c_compiler_rule(b, "LLVM_TOOL_CXX", 'CXX', 'c++', llvm_cxxflags)
--b.rule("LLVM_TOOL_LINK", "c++ -o $out $in %s" % llvm_core_libs, 'LINK $out')
-+c_compiler_rule(b, "LLVM_TOOL_CXX", 'LLVM-CXX', 'clang++', llvm_cxxflags)
-+b.rule("LLVM_TOOL_LINK", "clang++ -o $out $in %s" % llvm_core_libs, 'LINK $out')
-
- prepare_builtins = os.path.join('utils', 'prepare-builtins')
- b.build(os.path.join('utils', 'prepare-builtins.o'), "LLVM_TOOL_CXX",
-@@ -73,9 +99,14 @@ b.rule("PREPARE_BUILTINS", "%s -o $out $in" % prepare_builtins,
- manifest_deps = set([sys.argv[0], os.path.join(srcdir, 'build', 'metabuild.py'),
- os.path.join(srcdir, 'build', 'ninja_syntax.py')])
-
--install_files = []
-+install_files_bc = []
- install_deps = []
-
-+# Create libclc.pc
-+clc = open('libclc.pc', 'w')
-+clc.write('includedir=%(inc)s\nlibexecdir=%(lib)s\n\nName: libclc\nDescription: Library requirements of the OpenCL C programming language\nVersion: %(maj)s.%(min)s.%(pat)s\nCflags: -I${includedir}\nLibs: -L${libexecdir}' % {'inc': includedir, 'lib': libexecdir, 'maj': version_major, 'min': version_minor, 'pat': version_patch})
-+clc.close()
-+
- for target in targets:
- (t_arch, t_vendor, t_os) = target.split('-')
- archs = [t_arch]
-@@ -95,7 +126,6 @@ for target in targets:
- [os.path.join(srcdir, subdir, 'lib') for subdir in subdirs])
-
- clang_cl_includes = ' '.join(["-I%s" % incdir for incdir in incdirs])
-- install_files += [(incdir, incdir[len(srcdir)+1:]) for incdir in incdirs]
-
- # The rule for building a .bc file for the specified architecture using clang.
- clang_bc_flags = "-target %s -I`dirname $in` %s " \
-@@ -126,22 +156,20 @@ for target in targets:
-
- builtins_link_bc = os.path.join(target, 'lib', 'builtins.link.bc')
- builtins_opt_bc = os.path.join(target, 'lib', 'builtins.opt.bc')
-- builtins_bc = os.path.join(target, 'lib', 'builtins.bc')
-+ builtins_bc = os.path.join('built_libs', target + '.bc')
- b.build(builtins_link_bc, "LLVM_LINK", objects)
- b.build(builtins_opt_bc, "OPT", builtins_link_bc)
- b.build(builtins_bc, "PREPARE_BUILTINS", builtins_opt_bc, prepare_builtins)
-- install_files.append((builtins_bc, builtins_bc))
-+ install_files_bc.append((builtins_bc, builtins_bc))
- install_deps.append(builtins_bc)
- b.default(builtins_bc)
-
--if options.prefix:
-- install_cmd = ' && '.join(['mkdir -p %(dst)s && cp -r %(src)s %(dst)s' %
-- {'src': file,
-- 'dst': os.path.join(options.prefix,
-- os.path.dirname(dest))}
-- for (file, dest) in install_files])
-- b.rule('install', command = install_cmd, description = 'INSTALL')
-- b.build('install', 'install', install_deps)
-+install_cmd = ' && '.join(['mkdir -p $(DESTDIR)/%(dst)s && cp -r %(src)s $(DESTDIR)/%(dst)s' % {'src': file, 'dst': libexecdir} for (file,dest) in install_files_bc])
-+install_cmd = ' && '.join(['%(old)s && mkdir -p $(DESTDIR)/%(dst)s && cp -r generic/include/clc $(DESTDIR)/%(dst)s' % {'old': install_cmd, 'dst': includedir}])
-+install_cmd = ' && '.join(['%(old)s && mkdir -p $(DESTDIR)/%(dst)s && cp -r libclc.pc $(DESTDIR)/%(dst)s' % { 'old': install_cmd, 'dst': pkgconfigdir}])
-+
-+b.rule('install', command = install_cmd, description = 'INSTALL')
-+b.build('install', 'install', install_deps)
-
- b.rule("configure", command = ' '.join(sys.argv), description = 'CONFIGURE',
- generator = True)
---
-1.7.11.3
-
diff --git a/libclc-r600-support.patch b/libclc-r600-support.patch
deleted file mode 100644
index 3de9b68..0000000
--- a/libclc-r600-support.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From dc10fa6aeb9b5bd3855a69d1ac40a973f9164fe9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bernhard=20Rosenkr=E4nzer?= <bero at lindev.ch>
-Date: Sat, 12 Jan 2013 03:58:23 +0100
-Subject: [PATCH 3/3] Add r600 support
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Based on:
-http://www.pcc.me.uk/pipermail/libclc-dev/2012-December/000058.html
-
-From: Tom Stellard <thomas.stellard at amd.com>
-Signed-off-by: Bernhard Rosenkr�nzer <bero at lindev.ch>
----
- r600/lib/OVERRIDES | 2 ++
- r600/lib/SOURCES | 4 ++++
- r600/lib/workitem/get_global_size.ll | 18 ++++++++++++++++++
- r600/lib/workitem/get_group_id.ll | 18 ++++++++++++++++++
- r600/lib/workitem/get_local_id.ll | 18 ++++++++++++++++++
- r600/lib/workitem/get_local_size.ll | 18 ++++++++++++++++++
- 6 files changed, 78 insertions(+)
- create mode 100644 r600/lib/OVERRIDES
- create mode 100644 r600/lib/SOURCES
- create mode 100644 r600/lib/workitem/get_global_size.ll
- create mode 100644 r600/lib/workitem/get_group_id.ll
- create mode 100644 r600/lib/workitem/get_local_id.ll
- create mode 100644 r600/lib/workitem/get_local_size.ll
-
-diff --git a/r600/lib/OVERRIDES b/r600/lib/OVERRIDES
-new file mode 100644
-index 0000000..3f941d8
---- /dev/null
-+++ b/r600/lib/OVERRIDES
-@@ -0,0 +1,2 @@
-+workitem/get_group_id.cl
-+workitem/get_global_size.cl
-diff --git a/r600/lib/SOURCES b/r600/lib/SOURCES
-new file mode 100644
-index 0000000..af8c8c8
---- /dev/null
-+++ b/r600/lib/SOURCES
-@@ -0,0 +1,4 @@
-+workitem/get_group_id.ll
-+workitem/get_local_size.ll
-+workitem/get_local_id.ll
-+workitem/get_global_size.ll
-diff --git a/r600/lib/workitem/get_global_size.ll b/r600/lib/workitem/get_global_size.ll
-new file mode 100644
-index 0000000..ac2d08d
---- /dev/null
-+++ b/r600/lib/workitem/get_global_size.ll
-@@ -0,0 +1,18 @@
-+declare i32 @llvm.r600.read.global.size.x() nounwind readnone
-+declare i32 @llvm.r600.read.global.size.y() nounwind readnone
-+declare i32 @llvm.r600.read.global.size.z() nounwind readnone
-+
-+define i32 @get_global_size(i32 %dim) nounwind readnone alwaysinline {
-+ switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
-+x_dim:
-+ %x = call i32 @llvm.r600.read.global.size.x() nounwind readnone
-+ ret i32 %x
-+y_dim:
-+ %y = call i32 @llvm.r600.read.global.size.y() nounwind readnone
-+ ret i32 %y
-+z_dim:
-+ %z = call i32 @llvm.r600.read.global.size.z() nounwind readnone
-+ ret i32 %z
-+default:
-+ ret i32 0
-+}
-diff --git a/r600/lib/workitem/get_group_id.ll b/r600/lib/workitem/get_group_id.ll
-new file mode 100644
-index 0000000..5131648
---- /dev/null
-+++ b/r600/lib/workitem/get_group_id.ll
-@@ -0,0 +1,18 @@
-+declare i32 @llvm.r600.read.local.size.x() nounwind readnone
-+declare i32 @llvm.r600.read.local.size.y() nounwind readnone
-+declare i32 @llvm.r600.read.local.size.z() nounwind readnone
-+
-+define i32 @get_group_id(i32 %dim) nounwind readnone alwaysinline {
-+ switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
-+x_dim:
-+ %x = call i32 @llvm.r600.read.local.size.x() nounwind readnone
-+ ret i32 %x
-+y_dim:
-+ %y = call i32 @llvm.r600.read.local.size.y() nounwind readnone
-+ ret i32 %y
-+z_dim:
-+ %z = call i32 @llvm.r600.read.local.size.z() nounwind readnone
-+ ret i32 %z
-+default:
-+ ret i32 0
-+}
-diff --git a/r600/lib/workitem/get_local_id.ll b/r600/lib/workitem/get_local_id.ll
-new file mode 100644
-index 0000000..ac5522a
---- /dev/null
-+++ b/r600/lib/workitem/get_local_id.ll
-@@ -0,0 +1,18 @@
-+declare i32 @llvm.r600.read.tidig.x() nounwind readnone
-+declare i32 @llvm.r600.read.tidig.y() nounwind readnone
-+declare i32 @llvm.r600.read.tidig.z() nounwind readnone
-+
-+define i32 @get_local_id(i32 %dim) nounwind readnone alwaysinline {
-+ switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
-+x_dim:
-+ %x = call i32 @llvm.r600.read.tidig.x() nounwind readnone
-+ ret i32 %x
-+y_dim:
-+ %y = call i32 @llvm.r600.read.tidig.y() nounwind readnone
-+ ret i32 %y
-+z_dim:
-+ %z = call i32 @llvm.r600.read.tidig.z() nounwind readnone
-+ ret i32 %z
-+default:
-+ ret i32 0
-+}
-diff --git a/r600/lib/workitem/get_local_size.ll b/r600/lib/workitem/get_local_size.ll
-new file mode 100644
-index 0000000..6a71f75
---- /dev/null
-+++ b/r600/lib/workitem/get_local_size.ll
-@@ -0,0 +1,18 @@
-+declare i32 @llvm.r600.read.tgid.x() nounwind readnone
-+declare i32 @llvm.r600.read.tgid.y() nounwind readnone
-+declare i32 @llvm.r600.read.tgid.z() nounwind readnone
-+
-+define i32 @get_local_size(i32 %dim) nounwind readnone alwaysinline {
-+ switch i32 %dim, label %default [i32 0, label %x_dim i32 1, label %y_dim i32 2, label %z_dim]
-+x_dim:
-+ %x = call i32 @llvm.r600.read.tgid.x() nounwind readnone
-+ ret i32 %x
-+y_dim:
-+ %y = call i32 @llvm.r600.read.tgid.y() nounwind readnone
-+ ret i32 %y
-+z_dim:
-+ %z = call i32 @llvm.r600.read.tgid.z() nounwind readnone
-+ ret i32 %z
-+default:
-+ ret i32 0
-+}
---- libclc/configure.py.bero 2013-01-12 04:11:48.775174177 +0100
-+++ libclc/configure.py 2013-01-12 04:11:53.809113106 +0100
-@@ -69,7 +69,7 @@ llvm_clang = os.path.join(llvm_bindir, '
- llvm_link = os.path.join(llvm_bindir, 'llvm-link')
- llvm_opt = os.path.join(llvm_bindir, 'opt')
-
--default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl']
-+default_targets = ['nvptx--nvidiacl', 'nvptx64--nvidiacl', 'r600--']
-
- targets = args
- if not targets:
---
-1.7.11.3
-
diff --git a/libclc-support-for-overriding.patch b/libclc-support-for-overriding.patch
deleted file mode 100644
index a05e891..0000000
--- a/libclc-support-for-overriding.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2e363c062410d2f55d5b02df72c9f31c6d812c0e Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Bernhard=20Rosenkr=E4nzer?= <bero at lindev.ch>
-Date: Sat, 12 Jan 2013 03:54:14 +0100
-Subject: [PATCH 2/3] Support for overriding generic implementations.
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Based on:
-http://www.pcc.me.uk/pipermail/libclc-dev/2012-December/000057.html
-
-Targets can override generic implementations by adding a file called
-OVERRIDES in $(TARGET_DIR)/lib and listing the generic implementations
-that it wants to override. For example, to override get_group_id() and
-get_global_size() you would add these lines to the OVERRIDES file:
-
-workitem/get_group_id.cl
-workitem/get_global_size.cl
-
-From: Tom Stellard <thomas.stellard at amd.com>
-Signed-off-by: Bernhard Rosenkr�nzer <bero at lindev.ch>
----
- configure.py | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/configure.py b/configure.py
-index 8d1c2c5..b8a2bfe 100755
---- a/configure.py
-+++ b/configure.py
-@@ -137,6 +137,14 @@ for target in targets:
- for libdir in libdirs:
- subdir_list_file = os.path.join(libdir, 'SOURCES')
- manifest_deps.add(subdir_list_file)
-+ override_list_file = os.path.join(libdir, 'OVERRIDES')
-+
-+ # Add target overrides
-+ if os.path.exists(override_list_file):
-+ for override in open(override_list_file).readlines():
-+ override = override.rstrip()
-+ sources_seen.add(override)
-+
- for src in open(subdir_list_file).readlines():
- src = src.rstrip()
- if src not in sources_seen:
---
-1.7.11.3
-
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/llvm-libclc.git/commitdiff/1976bba8b7c88a69d7e755b97c33efb162913b5f
More information about the pld-cvs-commit
mailing list