pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/openjdk8 Pass ldflags to build, on BSDs.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e983e75af492
branches:  trunk
changeset: 365738:e983e75af492
user:      wiz <wiz%pkgsrc.org@localhost>
date:      Mon Jul 24 12:27:33 2017 +0000

description:
Pass ldflags to build, on BSDs.

Fixes RELRO build on NetBSD.

diffstat:

 lang/openjdk8/Makefile                                             |   5 +-
 lang/openjdk8/distinfo                                             |   7 ++-
 lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile      |  13 ++++++
 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make   |  15 ++++++-
 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make   |  13 ++++++
 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make |  21 ++++++++++
 6 files changed, 69 insertions(+), 5 deletions(-)

diffs (134 lines):

diff -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/Makefile
--- a/lang/openjdk8/Makefile    Mon Jul 24 12:26:35 2017 +0000
+++ b/lang/openjdk8/Makefile    Mon Jul 24 12:27:33 2017 +0000
@@ -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-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 @@
 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 -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/distinfo
--- a/lang/openjdk8/distinfo    Mon Jul 24 12:26:35 2017 +0000
+++ b/lang/openjdk8/distinfo    Mon Jul 24 12:27:33 2017 +0000
@@ -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-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 -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk8/patches/patch-hotspot_agent_src_os_bsd_Makefile     Mon Jul 24 12:27:33 2017 +0000
@@ -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 -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make
--- a/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make  Mon Jul 24 12:26:35 2017 +0000
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_defs.make  Mon Jul 24 12:27:33 2017 +0000
@@ -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 @@
    # 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 -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_jsig.make  Mon Jul 24 12:27:33 2017 +0000
@@ -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 -r b790d9ff2db3 -r e983e75af492 lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/openjdk8/patches/patch-hotspot_make_bsd_makefiles_saproc.make        Mon Jul 24 12:27:33 2017 +0000
@@ -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:]")
+ 



Home | Main Index | Thread Index | Old Index