$NetBSD: patch-make_launcher_LauncherCommon.gmk,v 1.1 2023/12/09 01:19:54 ryoon Exp $ * Link libjli.so dynamically. Fix runtime error of Bazel. --- make/launcher/LauncherCommon.gmk.orig 2023-10-18 04:30:34.000000000 +0000 +++ make/launcher/LauncherCommon.gmk @@ -155,7 +155,7 @@ define SetupBuildLauncherBody -framework ApplicationServices endif - ifneq ($(findstring $(OPENJDK_TARGET_OS), aix bsd), ) + ifneq ($(findstring $(OPENJDK_TARGET_OS), aix), ) $1_LDFLAGS += -L$(SUPPORT_OUTPUTDIR)/native/java.base $1_LIBS += -ljli_static endif @@ -183,6 +183,8 @@ define SetupBuildLauncherBody $$($1_LDFLAGS), \ LDFLAGS_linux := \ -L$(call FindLibDirForModule, java.base)/jli, \ + LDFLAGS_bsd := \ + -L$(call FindLibDirForModule, java.base)/jli, \ LDFLAGS_macosx := \ -L$(call FindLibDirForModule, java.base)/jli, \ LDFLAGS_solaris := $$($1_LDFLAGS_solaris) \ @@ -190,7 +192,7 @@ define SetupBuildLauncherBody LIBS := $(JDKEXE_LIBS) $$($1_LIBS), \ LIBS_unix := $$($1_LIBS_unix), \ LIBS_linux := -lpthread -ljli $(LIBDL), \ - LIBS_bsd := -pthread, \ + LIBS_bsd := -pthread -ljli, \ LIBS_macosx := -ljli, \ LIBS_solaris := -ljli -lthread $(LIBDL), \ LIBS_windows := $$($1_WINDOWS_JLI_LIB) \ @@ -208,7 +210,7 @@ define SetupBuildLauncherBody $$(BUILD_LAUNCHER_$1): $$(BUILD_PLIST_$1) - ifeq ($(call isTargetOs, aix bsd), true) + ifeq ($(call isTargetOs, aix), true) $$(BUILD_LAUNCHER_$1): $(call FindStaticLib, java.base, jli_static) endif