G++ used as a linker instead of gcc for C building

Hello,

I’m currently trying to replace a Makefile with a build.gradle file. Everything is almost done except that the linker used is g++ instead of gcc . This leads to the linking of the libstdc++ which is not consistent. My friends duckduckgo and google lead me to the solution of adding this line :

linker.executable = 'gcc'

However this solution doesn’t work as gradle as this error is raised:

No such property: executable for class: org.gradle.nativeplatform.internal.DefaultTool

My system informations are:

Build time:
 2014-11-10 13:31:44 UTC
Build number: none
Revision:
   aab8521f1fd9a3484cac18123a72bcfdeb7006ec
  Groovy:
     2.3.6
Ant:
        Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM:
        1.7.0_65 (Oracle Corporation 24.65-b04)
OS:
         Linux 3.16.0-28-generic amd64

Kind regards, Sébastien