Hello,
I’m new to Gradle and using gradle 2.1
I am cross compiling for arm using a CodeSourcery compiler. The compile step works and I can create a static library.
I am getting this error when trying to link a native (C++) shared library.
:compileReleaseIrapSharedLibraryIrapCpp UP-TO-DATE :linkReleaseIrapSharedLibrary /path/to/CodeSourcery/bin/arm-xilinx-linux-gnueabi-ld: unrecognized option ‘-Wl,-soname,libirap.so’ /path/to/CodeSourcery/bin/arm-xilinx-linux-gnueabi-ld: use the --help option for usage information :linkReleaseIrapSharedLibrary FAILED
Those appear to be default options that I have not specified. In the docs, it looks like I should be able to remove those options using args.remove. Below is my latest toolchain configuration and attempt to remove the “-Wl” flag. Thanks in advance for any ideas how to get past this.
model {
buildTypes {
debug
release
}
toolChains {
codesourcery(Gcc) {
path "/path/to/CodeSourcery/bin"
cCompiler.executable = 'arm-xilinx-linux-gnueabi-gcc'
cppCompiler.executable = 'arm-xilinx-linux-gnueabi-gcc'
linker.executable = 'arm-xilinx-linux-gnueabi-ld'
assembler.executable = 'arm-xilinx-linux-gnueabi-as'
staticLibArchiver.executable = 'arm-xilinx-linux-gnueabi-ar'
linker.withArguments { args ->
args.remove "-Wl"
}
}
}
}