summaryrefslogtreecommitdiff
path: root/src/net/sf/antcontrib/cpptasks/gcc
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2006-06-16 17:44:50 +0000
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2006-06-16 17:44:50 +0000
commit5ba0735d92fa10234e81c24d2157cd1c3771c37b (patch)
treef0d13bae4fac3438d1a29d3cd964c859aff938f1 /src/net/sf/antcontrib/cpptasks/gcc
parent760de60a50beffd524d1e8dd4997055c8bc0f010 (diff)
downloadcpptasks-parallel-5ba0735d92fa10234e81c24d2157cd1c3771c37b.tar.gz
cpptasks-parallel-5ba0735d92fa10234e81c24d2157cd1c3771c37b.tar.bz2
cpptasks-parallel-5ba0735d92fa10234e81c24d2157cd1c3771c37b.tar.xz
cpptasks-parallel-5ba0735d92fa10234e81c24d2157cd1c3771c37b.zip
Added flag to disable linking with CPP
Diffstat (limited to 'src/net/sf/antcontrib/cpptasks/gcc')
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
index 6248e00..c8d1da0 100644
--- a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
@@ -72,16 +72,20 @@ public class GppLinker extends AbstractLdLinker {
args.addElement("-mwindows");
}
}
- if (linkType.isStaticRuntime()) {
- String[] cmdin = new String[]{"g++", "-print-file-name=libstdc++.a"};
- String[] cmdout = CaptureStreamHandler.run(cmdin);
- if (cmdout.length > 0) {
- runtimeLibrary = cmdout[0];
+// FREEHEP, avoid stdc++ if requested
+ runtimeLibrary = null;
+ if (linkType.linkCPP()) {
+ if (linkType.isStaticRuntime()) {
+ String[] cmdin = new String[]{"g++", "-print-file-name=libstdc++.a"};
+ String[] cmdout = CaptureStreamHandler.run(cmdin);
+ if (cmdout.length > 0) {
+ runtimeLibrary = cmdout[0];
+ } else {
+ runtimeLibrary = null;
+ }
} else {
- runtimeLibrary = null;
+ runtimeLibrary = "-lstdc++";
}
- } else {
- runtimeLibrary = "-lstdc++";
}
// FREEHEP: set flag
linkType.callAddLibrarySets = true;