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