[Libclc-dev] [PATCH 1/1] configure: drop -fno-builtin

Jan Vesely via Libclc-dev libclc-dev at lists.llvm.org
Fri Jun 24 12:15:00 PDT 2016


We are using builtins.
Some builtins (copysign, fmax, fmin, ...) are translated to lirbary calls.
Using -fno-builtin makes those calls tagged nobuiltin and starting with 273039,
they are no longer translated to llvm opcodes, resulting in failed function call;
"<unknown>:0:0: in function test_1_copysign_float void (float addrspace(1)*, float addrspace(1)*, float addrspace(1)*): unsupported call to function copysignf"
Fixes: r273039

Signed-off-by: Jan Vesely <jan.vesely at rutgers.edu>
---
The alternative is to keep -fno-builtin and avoid using some __builtins.

 configure.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/configure.py b/configure.py
index b96faee..d3a3977 100755
--- a/configure.py
+++ b/configure.py
@@ -181,7 +181,6 @@ for target in targets:
   for device in available_targets[target]['devices']:
     # The rule for building a .bc file for the specified architecture using clang.
     clang_bc_flags = "-target %s -I`dirname $in` %s " \
-                     "-fno-builtin " \
                      "-D__CLC_INTERNAL " \
                      "-emit-llvm" % (target, clang_cl_includes)
     if device['gpu'] != '':
-- 
2.7.4



More information about the Libclc-dev mailing list