summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java8
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java9
-rw-r--r--src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java11
3 files changed, 25 insertions, 3 deletions
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
index 7bd2f97..a32e28a 100644
--- a/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
+++ b/src/net/sf/antcontrib/cpptasks/gcc/AbstractLdLinker.java
@@ -57,10 +57,14 @@ public abstract class AbstractLdLinker extends CommandLineLinker {
if (isDarwin()) {
if (linkType.isPluginModule()) {
args.addElement("-bundle");
+// FREEHEP
+ } else if (linkType.isJNIModule()) {
+ args.addElement("-dynamic");
+ args.addElement("-bundle");
} else {
if (linkType.isSharedLibrary()) {
- args.addElement("-prebind");
- args.addElement("-dynamiclib");
+ args.addElement("-prebind");
+ args.addElement("-dynamiclib");
}
}
} else {
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
index 227d446..be85124 100644
--- a/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GccLinker.java
@@ -43,6 +43,9 @@ public class GccLinker extends AbstractLdLinker {
discardFiles, "", "", false, null);
private static final GccLinker machBundleLinker = new GccLinker("gcc",
objFiles, discardFiles, "lib", ".bundle", false, null);
+// FREEHEP
+ private static final GccLinker machJNILinker = new GccLinker("gcc",
+ objFiles, discardFiles, "lib", ".jnilib", false, null);
private static final GccLinker machDllLinker = new GccLinker("gcc",
objFiles, discardFiles, "lib", ".dylib", false, null);
public static GccLinker getInstance() {
@@ -193,7 +196,11 @@ public class GccLinker extends AbstractLdLinker {
}
// FREEHEP
if (type.isJNIModule()) {
- return dllLinker;
+ if (isDarwin()) {
+ return machJNILinker;
+ } else {
+ return dllLinker;
+ }
}
if (type.isPluginModule()) {
if (isDarwin()) {
diff --git a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
index 84421f1..6248e00 100644
--- a/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
+++ b/src/net/sf/antcontrib/cpptasks/gcc/GppLinker.java
@@ -46,6 +46,9 @@ public class GppLinker extends AbstractLdLinker {
discardFiles, "", "", false, null);
private static final GppLinker machDllLinker = new GppLinker("gcc",
objFiles, discardFiles, "lib", ".dylib", false, null);
+// FREEHEP
+ private static final GppLinker machJNILinker = new GppLinker("gcc",
+ objFiles, discardFiles, "lib", ".jnilib", false, null);
private static final GppLinker machPluginLinker = new GppLinker("gcc",
objFiles, discardFiles, "lib", ".bundle", false, null);
public static GppLinker getInstance() {
@@ -186,6 +189,14 @@ public class GppLinker extends AbstractLdLinker {
if (type.isStaticLibrary()) {
return GccLibrarian.getInstance();
}
+// FREEHEP
+ if (type.isJNIModule()) {
+ if (isDarwin()) {
+ return machJNILinker;
+ } else {
+ return dllLinker;
+ }
+ }
if (type.isPluginModule()) {
if (GccProcessor.getMachine().indexOf("darwin") >= 0) {
return machPluginLinker;