diff options
author | Sven Gothel <[email protected]> | 2010-04-08 02:22:12 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2010-04-08 02:22:12 +0200 |
commit | 7cc4bb2a8bcc4c16b6a12826abbd874bf38f9dc1 (patch) | |
tree | eb932553d0f9b36dbe6d703356502bf352cc6eca /make/lib | |
parent | 82ac66ba1e7494b0a76a2063f0d56d3b785c6c31 (diff) |
http://jogamp.org/bugzilla/show_bug.cgi?id=393
Fixed junit test: test1
- Create seperate native libraries to reflect a real world example:
test1 - the library to bind to (no more declaring __stdcall @nn functions)
BindingTest1p1 - the dynamic fixed linkage binding test1p1,
references dynamic library test1 at linktime.
BindingTest1p2 - the dynamic runtime linkage binding test1p2,
loads dynamic library test1 at runtime.
Generic:
- gluegen-cpptasks-base.xml
- target 'gluegen.cpptasks.detect.os'
Set new property 'system.env.library.path'
DYLD_LIBRARY_PATH (macosx)
LD_LIBRARY_PATH (unix)
PATH (windows)
- target 'gluegen.cpptasks.striplibs'
Strips the symbols out of the native libraries
in case c.compiler.debug is false.
Maybe configured with the properties:
c.strip.tool, c.strip.args
- Using system.env.library.path in junit call
to find the test1 library in case of runtime linkage and lookup (test1p2).
- Use gluegen.cpptasks.striplibs for all native libs ..
- Added macosx32 in analogy to macosx64, both defaults to true now
- com.jogamp.common.os.WindowsDynamicLinkerImpl:lookupSymbol()
- Added lookup for __stdcall @nn (stepping alignment 4, max-args: 12)
in case no undecorated __cdecl symbol is found.
Fixed Windows platform:
- Use proper path.seperator on Windows.
- test1.dll needs proper soname inside for fixed linkage (test1p1)
hence the output name must be test1.dll, not libtest1.so
+++
http://jogamp.org/bugzilla/show_bug.cgi?id=394
Fix MacOsX platform:
The commit of cpptasks.jar, git hash 129e783741d91e9ee5cd7da5d5c962c32ec96b0b,
broke the universal binary build on MacOSX.
The above change used cpptasks-1.05b with a few patches in regards to crosscompilation,
but missed one, which accepts the '-arch' argument for GccLinker undecorated.
The new cpptasks.jar is vanilla 1.05b + cpptasks-1.0b5-darwin-patch.diff,
the latter a more refined one.
This version accepts the '-arch' argument undecorated on the darwin platform.
+++
Diffstat (limited to 'make/lib')
-rw-r--r-- | make/lib/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b (renamed from make/lib/CppTasksGCCNamespaceHack.jar) | bin | 7810 -> 7810 bytes | |||
-rw-r--r-- | make/lib/cpptasks-1.0b5-darwin-patch.diff | 39 | ||||
-rw-r--r-- | make/lib/cpptasks-1.0b5.zip | bin | 0 -> 2221439 bytes | |||
-rw-r--r-- | make/lib/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz (renamed from make/lib/cpptasks-patch.tar.gz) | bin | 7743 -> 7743 bytes | |||
-rw-r--r-- | make/lib/cpptasks.jar | bin | 363963 -> 364113 bytes | |||
-rw-r--r-- | make/lib/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b | bin | 0 -> 363963 bytes | |||
-rwxr-xr-x | make/lib/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 | bin | 0 -> 345356 bytes |
7 files changed, 39 insertions, 0 deletions
diff --git a/make/lib/CppTasksGCCNamespaceHack.jar b/make/lib/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b Binary files differindex c31779e..c31779e 100644 --- a/make/lib/CppTasksGCCNamespaceHack.jar +++ b/make/lib/CppTasksGCCNamespaceHack.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b diff --git a/make/lib/cpptasks-1.0b5-darwin-patch.diff b/make/lib/cpptasks-1.0b5-darwin-patch.diff new file mode 100644 index 0000000..1544fcc --- /dev/null +++ b/make/lib/cpptasks-1.0b5-darwin-patch.diff @@ -0,0 +1,39 @@ +diff -Nur cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java cpptasks-1.0b5-patched-01/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java +--- cpptasks-1.0b5/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2008-04-02 19:26:44.000000000 +0200 ++++ cpptasks-1.0b5-patched-01/src/main/java/net/sf/antcontrib/cpptasks/gcc/GccLinker.java 2010-04-07 22:16:03.330794801 +0200 +@@ -17,6 +17,8 @@ + package net.sf.antcontrib.cpptasks.gcc; + import java.io.File; + import java.util.Vector; ++import java.util.HashSet; ++import java.util.Arrays; + + import net.sf.antcontrib.cpptasks.CUtil; + import net.sf.antcontrib.cpptasks.compiler.LinkType; +@@ -36,6 +38,7 @@ + "-dynamiclib", "-nostartfiles", "-nostdlib", "-prebind", "-s", + "-static", "-shared", "-symbolic", "-Xlinker", + "--export-all-symbols", "-static-libgcc",}; ++ private static String[] darwinLinkerOptions = new String[]{"-arch", }; + private static final GccLinker dllLinker = new GccLinker("gcc", objFiles, + discardFiles, "lib", ".so", false, new GccLinker("gcc", objFiles, + discardFiles, "lib", ".so", true, null)); +@@ -97,12 +100,13 @@ + break; + default : + boolean known = false; +- for (int i = 0; i < linkerOptions.length; i++) { +- if (linkerOptions[i].equals(arg)) { +- known = true; +- break; +- } ++ HashSet allLinkerOptions = new HashSet(); ++ allLinkerOptions.addAll(Arrays.asList(linkerOptions)); ++ if (isDarwin()) { ++ allLinkerOptions.addAll(Arrays.asList(darwinLinkerOptions)); + } ++ known = allLinkerOptions.contains(arg); ++ + if (!known) { + buf.setLength(0); + buf.append("-Wl,"); diff --git a/make/lib/cpptasks-1.0b5.zip b/make/lib/cpptasks-1.0b5.zip Binary files differnew file mode 100644 index 0000000..21f8c07 --- /dev/null +++ b/make/lib/cpptasks-1.0b5.zip diff --git a/make/lib/cpptasks-patch.tar.gz b/make/lib/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz Binary files differindex 22f1cde..22f1cde 100644 --- a/make/lib/cpptasks-patch.tar.gz +++ b/make/lib/cpptasks-patch-orig-c91f003551542c2aab62dd8ef89a7894c7e50689.tar.gz diff --git a/make/lib/cpptasks.jar b/make/lib/cpptasks.jar Binary files differindex dec6c13..f1bf393 100644 --- a/make/lib/cpptasks.jar +++ b/make/lib/cpptasks.jar diff --git a/make/lib/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b b/make/lib/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b Binary files differnew file mode 100644 index 0000000..dec6c13 --- /dev/null +++ b/make/lib/cpptasks.jar-mbien-129e783741d91e9ee5cd7da5d5c962c32ec96b0b diff --git a/make/lib/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 b/make/lib/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 Binary files differnew file mode 100755 index 0000000..005691c --- /dev/null +++ b/make/lib/cpptasks.jar-orig-c91f003551542c2aab62dd8ef89a7894c7e50689 |