pkgsrc/lang/openjdk7/patches/patch-jdk_make_common_Program.gmk
ryoon f36464d339 Update to 1.7.141
* Support build and run under NetBSD PaX MPROTECT environment

Changelog:
Many bugfixes and security bugfixes
2017-08-14 00:02:16 +00:00

42 lines
1.6 KiB
Text

$NetBSD: patch-jdk_make_common_Program.gmk,v 1.4 2017/08/14 00:02:16 ryoon Exp $
GCC support.
--- jdk/make/common/Program.gmk.orig 2017-08-13 05:55:12.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
# AIX can not handle $ORIGIN so we have to link with the static JLI version (libjli.a)