summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2017-07-24 12:27:33 +0000
committerwiz <wiz@pkgsrc.org>2017-07-24 12:27:33 +0000
commit95bdcb16981db7becff0c41a491325d4eb5bdada (patch)
tree6b75af609d090546115063188c6f06cfc60088b2 /lang
parentd23555f5ac15bc0bf0d5aafcde4e4c3c62e513cd (diff)
downloadpkgsrc-95bdcb16981db7becff0c41a491325d4eb5bdada.tar.gz
Pass ldflags to build, on BSDs.
Fixes RELRO build on NetBSD.
Diffstat (limited to 'lang')
-rw-r--r--lang/openjdk8/Makefile5
-rw-r--r--lang/openjdk8/distinfo7
-rw-r--r--lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile13
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make15
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make13
-rw-r--r--lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make21
6 files changed, 69 insertions, 5 deletions
diff --git a/lang/openjdk8/Makefile b/lang/openjdk8/Makefile
index 969df2b34a3..6928640d827 100644
--- a/lang/openjdk8/Makefile
+++ b/lang/openjdk8/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.49 2017/05/10 14:01:58 ryoon Exp $
+# $NetBSD: Makefile,v 1.50 2017/07/24 12:27:33 wiz Exp $
DISTNAME= openjdk-1.8.131-20170427
PKGNAME= openjdk8-1.8.131
@@ -59,6 +59,7 @@ CONFIGURE_ARGS+= --disable-precompiled-headers
CONFIGURE_ARGS+= --disable-ccache
CONFIGURE_ARGS+= --with-user-release-suffix=pkgsrc_${PKGVERSION}
CONFIGURE_ARGS+= --with-update-version=${PKGVERSION_NOREV:S/1.8.//}
+CONFIGURE_ARGS+= --with-extra-ldflags=${LDFLAGS:Q}
CHECK_PORTABILITY_SKIP+= hotspot/test/runtime/*/*.sh
@@ -80,6 +81,8 @@ BUILDDIR= ${WRKSRC}/build/${BUILD_OPSYS}-${BUILD_ARCH}-normal-${BUILD_VARIANT}-$
LD_LIBRARY_PATH= ${WRKDIR}/bootstrap/jre/lib/${LIBDIR_ARCH}:${WRKDIR}/bootstrap/jre/lib/${LIBDIR_ARCH}/jli:${WRKDIR}/bootstrap/jre/lib/${LIBDIR_ARCH}/server
CONFIGURE_ENV+= LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
MAKE_ENV+= LD_LIBRARY_PATH=${LD_LIBRARY_PATH}
+CONFIGURE_ENV+= LFLAGS=${LDFLAGS:Q}
+MAKE_ENV+= LFLAGS=${LDFLAGS:Q}
BUILDLINK_PASSTHRU_RPATHDIRS+= ${PREFIX}/java/openjdk8/jre/lib/${LIBDIR_ARCH}
PLIST_SUBST+= ARCH=${LIBDIR_ARCH}
diff --git a/lang/openjdk8/distinfo b/lang/openjdk8/distinfo
index 8521c7e6349..85d4e95329a 100644
--- a/lang/openjdk8/distinfo
+++ b/lang/openjdk8/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.48 2017/07/18 19:53:11 jmcneill Exp $
+$NetBSD: distinfo,v 1.49 2017/07/24 12:27:33 wiz Exp $
SHA1 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 7408f52d3bbe35c2b14bbd3215cbf60f1335d334
RMD160 (openjdk7/bootstrap-jdk-1.7.76-freebsd-10-amd64-20150301.tar.xz) = 24f1577b5fc86d137f070aedb4610c8c89e45815
@@ -61,8 +61,11 @@ SHA1 (patch-bn) = a50dbe17236a90d60d4bbb852ae447e51a279892
SHA1 (patch-common_autoconf_boot-jdk.m4) = 530da90ea4062f9d8c208557ff634579b0b19f55
SHA1 (patch-common_autoconf_generated-configure.sh) = 116f1b37fc737ca30998a28b40ef00f7be95a744
SHA1 (patch-common_autoconf_spec.gmk.in) = e98bc4c8a09f49c6a26447e6f78abf4709ee694b
+SHA1 (patch-hotspot_agent_src_os_bsd_Makefile) = a686ca478011561df93cce6311b5a344d79c3a24
SHA1 (patch-hotspot_agent_src_share_classes_sun_jvm_hotspot_utilities_PlatformInfo.java) = 893f3b7ad0839a75be49ddd0f5eefcff2dbd2928
-SHA1 (patch-hotspot_make_bsd_makefiles_defs.make) = 2d350a9b47883b3101e97cafa987104e2c4c54c4
+SHA1 (patch-hotspot_make_bsd_makefiles_defs.make) = 2c0d286c87f8239e8d5aa7fcc21e09b4b1c5a46e
+SHA1 (patch-hotspot_make_bsd_makefiles_jsig.make) = 36ba2dc2db7d802aa558ea984afa42ae2d61deb7
+SHA1 (patch-hotspot_make_bsd_makefiles_saproc.make) = 76a0cc758ee1d62136e8e698df7e46fe20aa9e19
SHA1 (patch-hotspot_make_solaris_makefiles_adlc.make) = 1d1be862ed0d8fc3da4710da169ad5a965d9df14
SHA1 (patch-hotspot_make_solaris_makefiles_build__vm__def.sh) = 54d197a94d27406f2957b5c2a7a7982866f99239
SHA1 (patch-hotspot_make_solaris_makefiles_debug.make) = 7195c97c4f559b2e9410028315de351c5047d59d
diff --git a/lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile b/lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile
new file mode 100644
index 00000000000..8d3b49c00c1
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile
@@ -0,0 +1,13 @@
+$NetBSD: patch-hotspot_agent_src_os_bsd_Makefile,v 1.1 2017/07/24 12:27:33 wiz Exp $
+
+--- hotspot/agent/src/os/bsd/Makefile.orig 2017-04-27 09:45:04.000000000 +0000
++++ hotspot/agent/src/os/bsd/Makefile
+@@ -85,6 +85,8 @@ ifndef LDNOMAP
+ LFLAGS_LIBSA = -Xlinker --version-script=mapfile
+ endif
+
++LFLAGS_LIBSA += $(EXTRA_LDFLAGS)
++
+ $(LIBSA): $(OBJSPLUS) mapfile
+ if [ ! -d $(ARCH) ] ; then mkdir $(ARCH) ; fi
+ $(GCC) -shared $(LFLAGS_LIBSA) -o $(LIBSA) $(FOUNDATIONFLAGS) $(OBJSPLUS) $(LIBS) $(SALIBS)
diff --git a/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make
index 5ae943c7a8d..52fd8ac6f0e 100644
--- a/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make
@@ -1,6 +1,6 @@
-$NetBSD: patch-hotspot_make_bsd_makefiles_defs.make,v 1.4 2016/08/15 19:09:38 ryoon Exp $
+$NetBSD: patch-hotspot_make_bsd_makefiles_defs.make,v 1.5 2017/07/24 12:27:33 wiz Exp $
---- hotspot/make/bsd/makefiles/defs.make.orig 2016-08-11 05:37:43.000000000 +0000
+--- hotspot/make/bsd/makefiles/defs.make.orig 2017-04-27 09:45:08.000000000 +0000
+++ hotspot/make/bsd/makefiles/defs.make
@@ -31,7 +31,7 @@ SLASH_JAVA ?= /java
# Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name
@@ -11,3 +11,14 @@ $NetBSD: patch-hotspot_make_bsd_makefiles_defs.make,v 1.4 2016/08/15 19:09:38 ry
# Fold little endian PowerPC64 into big-endian (if ARCH is set in
# hotspot-spec.gmk, this will be done by the configure script).
ifeq ($(ARCH),ppc64le)
+@@ -45,6 +45,10 @@ else
+ ARCH_DATA_MODEL ?= 32
+ endif
+
++# Extra flags from gnumake's invocation or environment
++CFLAGS += $(EXTRA_CFLAGS)
++LFLAGS += $(EXTRA_LDFLAGS)
++
+ # zero
+ ifeq ($(findstring true, $(JVM_VARIANT_ZERO) $(JVM_VARIANT_ZEROSHARK)), true)
+ ifeq ($(ARCH_DATA_MODEL), 64)
diff --git a/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make
new file mode 100644
index 00000000000..5ff779bb59c
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make
@@ -0,0 +1,13 @@
+$NetBSD: patch-hotspot_make_bsd_makefiles_jsig.make,v 1.1 2017/07/24 12:27:33 wiz Exp $
+
+--- hotspot/make/bsd/makefiles/jsig.make.orig 2017-04-27 09:45:08.000000000 +0000
++++ hotspot/make/bsd/makefiles/jsig.make
+@@ -52,7 +52,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfi
+ # cause problems with interposing. See CR: 6466665
+ # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE))
+
+-LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE)
++LFLAGS_JSIG += -D_GNU_SOURCE -pthread $(LDFLAGS_HASH_STYLE) $(EXTRA_LDFLAGS)
+
+ # DEBUG_BINARIES overrides everything, use full -g debug information
+ ifeq ($(DEBUG_BINARIES), true)
diff --git a/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make
new file mode 100644
index 00000000000..75851a4173f
--- /dev/null
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make
@@ -0,0 +1,21 @@
+$NetBSD: patch-hotspot_make_bsd_makefiles_saproc.make,v 1.1 2017/07/24 12:27:33 wiz Exp $
+
+--- hotspot/make/bsd/makefiles/saproc.make.orig 2017-04-27 09:45:08.000000000 +0000
++++ hotspot/make/bsd/makefiles/saproc.make
+@@ -107,7 +107,6 @@ ifneq ($(filter-out ia64 arm zero,$(SRCA
+ endif
+ endif
+
+-
+ ifneq ($(OS_VENDOR), Darwin)
+ SA_LFLAGS = $(MAPFLAG:FILENAME=$(SAMAPFILE))
+ else
+@@ -116,6 +115,8 @@ SA_LFLAGS = $(LFLAGS)
+ endif
+ SA_LFLAGS += $(LDFLAGS_HASH_STYLE)
+
++SA_LFLAGS += $(EXTRA_LDFLAGS)
++
+ BOOT_JAVA_INCLUDES = -I$(BOOT_JAVA_HOME)/include \
+ -I$(BOOT_JAVA_HOME)/include/$(shell uname -s | tr "[:upper:]" "[:lower:]")
+