From 3cb6f522dba190949da634446b9169b18eb7d856 Mon Sep 17 00:00:00 2001 From: Reno Reckling Date: Tue, 20 Sep 2016 14:50:22 +0300 Subject: [PATCH] amdapp-sdk: fix build for gcc 5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit 1dcd93c1def1b26b0b4736a33fb8246b53602e73) Signed-off-by: Domen Kožar --- pkgs/development/misc/amdapp-sdk/default.nix | 3 ++- pkgs/development/misc/amdapp-sdk/gcc-5.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 pkgs/development/misc/amdapp-sdk/gcc-5.patch diff --git a/pkgs/development/misc/amdapp-sdk/default.nix b/pkgs/development/misc/amdapp-sdk/default.nix index acd71d65c0eb..fc2981f7f1f7 100644 --- a/pkgs/development/misc/amdapp-sdk/default.nix +++ b/pkgs/development/misc/amdapp-sdk/default.nix @@ -22,6 +22,7 @@ let url = "http://download2-developer.amd.com/amd/APPSDK/AMD-APP-SDK-v2.7-lnx${bits}.tgz"; x86 = "1v26n7g1xvlg5ralbfk3qiy34gj8fascpnjzm3120b6sgykfp16b"; x86_64 = "08bi43bgnsxb47vbirh09qy02w7zxymqlqr8iikk9aavfxjlmch1"; + patches = [ ./gcc-5.patch]; }; "2.8" = { @@ -30,7 +31,7 @@ let x86_64 = "d9c120367225bb1cd21abbcf77cb0a69cfb4bb6932d0572990104c566aab9681"; # TODO: Add support for aparapi, java parallel api - patches = [ ./01-remove-aparapi-samples.patch ]; + patches = [ ./01-remove-aparapi-samples.patch ./gcc-5.patch]; }; }; diff --git a/pkgs/development/misc/amdapp-sdk/gcc-5.patch b/pkgs/development/misc/amdapp-sdk/gcc-5.patch new file mode 100644 index 000000000000..dc8538db4c1f --- /dev/null +++ b/pkgs/development/misc/amdapp-sdk/gcc-5.patch @@ -0,0 +1,11 @@ +--- include/CL/cl.hpp ++++ include/CL/cl.hpp +@@ -201,7 +201,7 @@ + #include + #define __CL_FUNCTION_TYPE typename std::function + #define CL_USE_CPP_FUNCTORS +-#elif (__GNUC__ == 4 && __GNUC_MINOR__ >= 1 && !defined(STLPORT)) || defined(__APPLE__) || defined(__MACOSX) ++#elif (((__GNUC__ == 4 && __GNUC_MINOR__ >= 1) || (__GNUC__ >= 5)) && !defined(STLPORT)) || defined(__APPLE__) || defined(__MACOSX) + #include + #define __CL_FUNCTION_TYPE typename std::tr1::function + #define CL_USE_CPP_FUNCTORS