1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
From: Stefano Zacchiroli <zack@upsilon.cc>
Date: Thu, 26 Nov 2009 13:55:49 +0100
Subject: [PATCH] ldflags for recent JDK
---
Makefile.config | 17 ++++++++++++-----
1 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile.config b/Makefile.config
index 5cd82d8..133cd2d 100644
--- a/Makefile.config
+++ b/Makefile.config
@@ -17,7 +17,13 @@ JAVAC=javac -g
## For other platforms, adjust as required and tell us about it.
# Home location for the JDK. Only used for setting other variables below.
-JDKHOME=/usr/local/java_1.4.2
+JDKHOME=/usr/lib/jvm/java-6-sun
+
+# Current architecture identification string, as intended by the JDK.
+# Common values for x86 architectures are "i386" or "amd64". You can find it
+# out by looking for the "*" patch component in the following pattern:
+# $(JDKHOME)/jre/lib/*/libjava.so
+ARCH=amd64
# Where to find the JNI include files (for compiling the OCaml-JNI C stubs)
JNIINCLUDES=-I$(JDKHOME)/include -I$(JDKHOME)/include/linux
@@ -26,10 +32,11 @@ JNIINCLUDES=-I$(JDKHOME)/include -I$(JDKHOME)/include/linux
JNILIBS=-ljava
# Additional link-time options to pass to $(CC) when linking with $(JNILIBS)
-JNILIBOPTS=-L$(JDKHOME)/jre/lib/i386/ \
- -Wl,-rpath,$(JDKHOME)/jre/lib/i386/ \
- -Wl,-rpath,$(JDKHOME)/jre/lib/i386/client \
- -Wl,-rpath,$(JDKHOME)/jre/lib/i386/native_threads
+JNILIBOPTS=-L$(JDKHOME)/jre/lib/$(ARCH)/ \
+ -L$(JDKHOME)/jre/lib/$(ARCH)/server \
+ -Wl,-rpath,$(JDKHOME)/jre/lib/$(ARCH)/ \
+ -Wl,-rpath,$(JDKHOME)/jre/lib/$(ARCH)/server \
+ -Wl,-rpath,$(JDKHOME)/jre/lib/$(ARCH)/native_threads
# Additional options when compiling the OCaml-JNI C stubs.
# -DJDK122_LINUX_HACK works around a nasty thread-related bug of
--
|