summaryrefslogtreecommitdiff
path: root/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java')
-rw-r--r--src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
index 999ccf7..f9e4c0b 100644
--- a/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
+++ b/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccCCompiler.java
@@ -59,6 +59,11 @@ public final class GccCCompiler extends GccCompatibleCCompiler {
sourceExtensions, headerExtensions, false,
new GccCCompiler("g77", sourceExtensions, headerExtensions, true,
null, false, null), false, null);
+// FREEHEP
+ private static final GccCCompiler gfortranInstance = new GccCCompiler("gfortran",
+ sourceExtensions, headerExtensions, false,
+ new GccCCompiler("gfortran", sourceExtensions, headerExtensions, true,
+ null, false, null), false, null);
private static final GccCCompiler gppInstance = new GccCCompiler("g++",
sourceExtensions, headerExtensions, false,
new GccCCompiler("g++", sourceExtensions, headerExtensions, true,
@@ -80,6 +85,14 @@ public final class GccCCompiler extends GccCompatibleCCompiler {
return g77Instance;
}
/**
+ * Gets g77 adapter
+ */
+// FREEHEPBEGIN
+ public static GccCCompiler getGFortranInstance() {
+ return gfortranInstance;
+ }
+// FREEHEPEND
+ /**
* Gets gpp adapter
*/
public static GccCCompiler getGppInstance() {
@@ -118,6 +131,12 @@ public final class GccCCompiler extends GccCompatibleCCompiler {
if (isPICMeaningful && linkType.isSharedLibrary()) {
args.addElement("-fPIC");
}
+// BEGINFREEHEP
+ // Add -fno_rtti only for g++ and c++
+ if (!getCommand().equals("g77") && !getCommand().equals("gcc") && (rtti != null) && (!rtti.booleanValue())) {
+ args.addElement("-fno_rtti");
+ }
+// ENDFREEHEP
}
public Processor changeEnvironment(boolean newEnvironment, Environment env) {
if (newEnvironment || env != null) {
@@ -237,6 +256,6 @@ public final class GccCCompiler extends GccCompatibleCCompiler {
return GccLinker.getInstance().getLinker(linkType);
}
public int getMaximumCommandLength() {
- return Integer.MAX_VALUE;
+ return isWindows() ? 20000 : Integer.MAX_VALUE;
}
}