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

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@rutgers.edu>

I think we should continue using it, but fix the builtins we expect to really be emitting intrinsics: http://reviews.llvm.org/D5896

-Matt

>
>
> 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@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
>
> _______________________________________________
> Libclc-dev mailing list
> Libclc-dev@lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/libclc-dev

I think we should continue using it, but fix the builtins we expect
to really be emitting intrinsics: http://reviews.llvm.org/D5896
<http://reviews.llvm.org/D5896&gt;

yeah, that works better. thanks for pointing me to the revision.

although mixing no-builtin and __builtin still looks weird.
self-NAK

Jan