]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
target-supports.exp (check_libcilkrts_available): Added an extern "C" if we are using...
authorBalaji V. Iyer <balaji.v.iyer@intel.com>
Wed, 15 Jan 2014 19:11:16 +0000 (19:11 +0000)
committerBalaji V. Iyer <bviyer@gcc.gnu.org>
Wed, 15 Jan 2014 19:11:16 +0000 (11:11 -0800)
2014-01-15  Balaji V. Iyer  <balaji.v.iyer@intel.com>

       * lib/target-supports.exp (check_libcilkrts_available): Added an
       extern "C" if we are using C++ along with a function prototype.

From-SVN: r206640

gcc/testsuite/ChangeLog
gcc/testsuite/lib/target-supports.exp

index dcfb67197f0bf215e75b441a034dc0d36ae86112..b85e51e6fdcb05e2da55182709888de431ab06cd 100644 (file)
@@ -1,3 +1,8 @@
+2014-01-15  Balaji V. Iyer  <balaji.v.iyer@intel.com>
+
+       * lib/target-supports.exp (check_libcilkrts_available): Added an
+       extern "C" if we are using C++ along with a function prototype.
+
 2014-01-15  Jeff Law  <law@redhat.com>
 
        PR tree-optimization/59747
index 159f88f28dd838d4aee6d75f8d21897695609c49..ebb28aeb39f86415aa410beed22da4dd4acd530a 100644 (file)
@@ -1038,9 +1038,13 @@ proc check_iconv_available { test_what } {
 # Return true if Cilk Library is supported on the target.
 proc check_libcilkrts_available { } {
   return [ check_no_compiler_messages_nocache libcilkrts_available executable {
+       #ifdef __cplusplus
+       extern "C" 
+       #endif
+          int __cilkrts_set_param (const char *, const char *);
            int main (void) { 
-               __cilkrts_set_param ("nworkers", "0");  
-               return 0
+               int x = __cilkrts_set_param ("nworkers", "0");
+               return x
            }
        } "-fcilkplus -lcilkrts" ]
 }