summaryrefslogtreecommitdiff
path: root/lang/openjdk7/patches/patch-jdk_make_common_Program.gmk
blob: 533b319d0c6f7b7461b0893aa2c651840f7494c4 (plain)
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
$NetBSD: patch-jdk_make_common_Program.gmk,v 1.3 2014/01/02 01:16:35 ryoon Exp $

GCC support.

--- jdk/make/common/Program.gmk.orig	2014-01-01 05:53:33.000000000 +0000
+++ jdk/make/common/Program.gmk
@@ -65,7 +65,10 @@ program: $(ACTUAL_PROGRAM)
 ifndef CROSS_COMPILE_ARCH
   # reuse the mapfiles in the launcher's directory, the same should
   # be applicable to the tool launchers as well.
-  FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
+  # Except when the makefile requests a specific mapfile.
+  ifndef FILES_m
+    FILES_m = $(BUILDDIR)/java/main/java/mapfile-$(ARCH)
+  endif # ! FILES_m
   include $(BUILDDIR)/common/Mapfile-vers.gmk
 endif
 
@@ -110,10 +113,11 @@ ifneq (,$(findstring $(PLATFORM), linux 
   LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
   OTHER_LDLIBS += -ljli
   ifeq ($(PLATFORM), solaris)
+    LDFLAGS += -R ${PREFIX}/java/openjdk7/jre/lib/${LIBARCH}/jli
     ifeq ($(ARCH_DATA_MODEL), 32)
-      LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
+#      LDFLAGS += -R \$$ORIGIN/../lib/$(LIBARCH)/jli
     else # ! ARCH_DATA_MODEL 64-bit
-      LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
+#      LDFLAGS += -R \$$ORIGIN/../../lib/$(LIBARCH)/jli
     endif # ARCH_DATA_MODEL
   endif # PLATFORM SOLARIS
   ifeq ($(PLATFORM), linux)
@@ -121,6 +125,9 @@ ifneq (,$(findstring $(PLATFORM), linux 
     LDFLAGS += -Wl,--allow-shlib-undefined
     LDFLAGS += -Wl,-rpath -Wl,\$$ORIGIN/../lib/$(LIBARCH)/jli
   endif # PLATFORM LINUX
+  ifeq ($(SYSTEM_ZLIB),true)
+    OTHER_LDLIBS += $(ZLIB_LIBS)
+  endif # SYSTEM_ZLIB
 endif # PLATFORM linux solaris
 
 ifeq ($(PLATFORM), windows)