$NetBSD$ Ensure support libraries can be found during build. --- a/make/autoconf/spec.gmk.in.orig 2019-01-08 09:40:27.000000000 +0000 +++ b/make/autoconf/spec.gmk.in @@ -517,12 +517,12 @@ LD:=@FIXPATH@ @LD@ SDKROOT:=@SDKROOT@ # LDFLAGS used to link the jdk native libraries (C-code) -LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@ +LDFLAGS_JDKLIB:=-Xlinker -R@prefix@/java/openjdk11/lib -Xlinker -R@prefix@/java/openjdk11/lib/jli -Xlinker -R@prefix@/java/openjdk11/lib/server @LDFLAGS_JDKLIB@ JDKLIB_LIBS:=@JDKLIB_LIBS@ GLOBAL_LIBS:=@GLOBAL_LIBS@ # LDFLAGS used to link the jdk native launchers (C-code) -LDFLAGS_JDKEXE:=@LDFLAGS_JDKEXE@ +LDFLAGS_JDKEXE:=-Xlinker -R@prefix@/java/openjdk11/lib/jli @LDFLAGS_JDKEXE@ JDKEXE_LIBS:=@JDKEXE_LIBS@ # LDFLAGS specific to C++ linking. @@ -636,9 +636,9 @@ JAVA_SMALL=@FIXPATH@ $(JAVA_CMD) $(JAVA_ JAVA_JAVAC = $(JAVA_CMD) $(JAVA_FLAGS_JAVAC) $(JAVA_FLAGS) JAVAC = $(JAVAC_CMD) JAVADOC = $(JAVADOC_CMD) -JAR = $(JAR_CMD) -JLINK = $(JLINK_CMD) -JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL) +JAR = LD_LIBRARY_PATH=$(BUILD_JDK)/lib:$(BUILD_JDK)/lib/jli:$(BUILD_JDK)/lib/server $(JAR_CMD) +JLINK = LD_LIBRARY_PATH=$(BUILD_JDK)/lib:$(BUILD_JDK)/lib/jli:$(BUILD_JDK)/lib/server $(JLINK_CMD) +JMOD = LD_LIBRARY_PATH=$(BUILD_JDK)/lib:$(BUILD_JDK)/lib/jli:$(BUILD_JDK)/lib/server $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL) # A specific java binary with specific options can be used to run # the long running background sjavac servers and other long running tasks. SJAVAC_SERVER_JAVA = $(SJAVAC_SERVER_JAVA_CMD) \ @@ -649,8 +649,8 @@ JAVAC_FLAGS?=@JAVAC_FLAGS@ JAVAC_FLAGS? = @JAVAC_FLAGS@ BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@ -BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) -BUILD_JAR=@FIXPATH@ $(BUILD_JDK)/bin/jar +BUILD_JAVA=LD_LIBRARY_PATH=$(BUILD_JDK)/lib:$(BUILD_JDK)/lib/jli:$(BUILD_JDK)/lib/server @FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS) +BUILD_JAR=LD_LIBRARY_PATH=$(BUILD_JDK)/lib:$(BUILD_JDK)/lib/jli:$(BUILD_JDK)/lib/server @FIXPATH@ $(BUILD_JDK)/bin/jar # Interim langtools and rmic modules and arguments INTERIM_LANGTOOLS_BASE_MODULES := java.compiler jdk.compiler jdk.javadoc