summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Donszelmann <Mark.Donszelmann@gmail.com>2006-08-18 22:35:32 +0000
committerMark Donszelmann <Mark.Donszelmann@gmail.com>2006-08-18 22:35:32 +0000
commit1622d8148300f95c3014c9188449f4d0c4008b4e (patch)
tree1ff6376b186d3880c8674532dba1141e231d29b6
parent6c00635e2ac7134a58fd47c3232991452ca623a5 (diff)
downloadcpptasks-parallel-1622d8148300f95c3014c9188449f4d0c4008b4e.tar.gz
cpptasks-parallel-1622d8148300f95c3014c9188449f4d0c4008b4e.tar.bz2
cpptasks-parallel-1622d8148300f95c3014c9188449f4d0c4008b4e.tar.xz
cpptasks-parallel-1622d8148300f95c3014c9188449f4d0c4008b4e.zip
Fixed NAR-46
-rw-r--r--PATCHES3
-rw-r--r--pom.xml2
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java11
3 files changed, 14 insertions, 2 deletions
diff --git a/PATCHES b/PATCHES
index 341096b..b16dfa5 100644
--- a/PATCHES
+++ b/PATCHES
@@ -1,4 +1,7 @@
*** Changes marked with FREEHEP.
+cpptasks-20051015-patched-1.2-SNAPSHOT
+- added -shared-libgcc/-static-libgcc for linking gcc and c++.
+
cpptasks-20051015-patched-1.1
- [CCTask] added method to link with CPP
- [compiler.LinkType] added method to link with CPP
diff --git a/pom.xml b/pom.xml
index 9fe3d4e..fe5d99c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -3,7 +3,7 @@
<groupId>net.sf.antcontrib</groupId>
<artifactId>cpptasks</artifactId>
<name>CPPTasks (modified)</name>
- <version>20051015-patched-1.1</version>
+ <version>20051015-patched-1.2-SNAPSHOT</version>
<description>
Library to call native compilers and linkers.
</description>
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
index c8d1da0..ed18581 100644
--- a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
@@ -41,7 +41,9 @@ public class GppLinker extends AbstractLdLinker {
".lib", ".dll", ".so", ".sl"};
private static String[] linkerOptions = new String[]{"-bundle", "-dylib",
"-dynamic", "-dynamiclib", "-nostartfiles", "-nostdlib",
- "-prebind", "-s", "-static", "-shared", "-symbolic", "-Xlinker"};
+ "-prebind", "-s", "-static", "-shared", "-symbolic", "-Xlinker",
+// FREEHEP
+ "-static-libgcc", "-shared-libgcc"};
private static final GppLinker instance = new GppLinker("gcc", objFiles,
discardFiles, "", "", false, null);
private static final GppLinker machDllLinker = new GppLinker("gcc",
@@ -56,6 +58,7 @@ public class GppLinker extends AbstractLdLinker {
}
private File[] libDirs;
private String runtimeLibrary;
+ private String gccLibrary;
protected GppLinker(String command, String[] extensions,
String[] ignoredExtensions, String outputPrefix,
String outputSuffix, boolean isLibtool, GppLinker libtoolLinker) {
@@ -74,6 +77,7 @@ public class GppLinker extends AbstractLdLinker {
}
// FREEHEP, avoid stdc++ if requested
runtimeLibrary = null;
+ gccLibrary = null;
if (linkType.linkCPP()) {
if (linkType.isStaticRuntime()) {
String[] cmdin = new String[]{"g++", "-print-file-name=libstdc++.a"};
@@ -83,8 +87,10 @@ public class GppLinker extends AbstractLdLinker {
} else {
runtimeLibrary = null;
}
+ gccLibrary = "-static-libgcc";
} else {
runtimeLibrary = "-lstdc++";
+ gccLibrary = "-shared-libgcc";
}
}
// FREEHEP: set flag
@@ -97,6 +103,9 @@ public class GppLinker extends AbstractLdLinker {
if (runtimeLibrary != null) {
endargs.addElement(runtimeLibrary);
}
+ if (gccLibrary != null) {
+ endargs.addElement(gccLibrary);
+ }
return rs;
}
/**